appledoc icon indicating copy to clipboard operation
appledoc copied to clipboard

Embedded code is generating errors

Open drekka opened this issue 10 years ago • 4 comments

I have a header that looks like this:

/**
  Simple class that is designed to execute a block when a variable goes out of scope.

 @discussion To use it, do something like the following

    id hook = [[STDeallocHook alloc] initWithBlock:^{
        // Do something when 'hook' is dealloced
    }];
*/

I'm getting this error:

StoryTeller/STDeallocHook.h:16: warning: Invalid [[STDeallocHook alloc] reference found near STDeallocHook.h@16, unknown object : [STDeallocHook !

Not sure how to make this go away. It appears that appledoc is seeing the code as a link.

drekka avatar Aug 06 '15 04:08 drekka

Copying above snippet seems like there's single tab in front of example code line(s). Try adding a space at the start of each of those lines, followed by a tab.

tomaz avatar Aug 06 '15 06:08 tomaz

Hi Tomaz, I've tried with multiple spaces (4), multiple tabs, and combinations. Everything I've tried still results in an error being generated.

Just to clarify, Appledoc does see the code as code and format it as code. But it's also looking at the code and seeing the [] as a link.

Hope that makes sense.

drekka avatar Aug 11 '15 02:08 drekka

Hmm, this was definitely working, seems like regression...

tomaz avatar Aug 11 '15 05:08 tomaz

I am also running into this behavior. I'm using 4 spaces and any code I write in my docs triggers these errors.

schell avatar Jan 15 '16 20:01 schell