tomaz / appledoc

Objective-c code Apple style documentation set generator.
http://gentlebytes.com
4.2k stars 644 forks source link

Embedded code is generating errors #549

Open drekka opened 9 years ago

drekka commented 9 years ago

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.

tomaz commented 9 years ago

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.

drekka commented 9 years ago

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.

tomaz commented 9 years ago

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

schell commented 8 years ago

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