Skip to content

Invalid cross reference are reported for examples inside code span or block #72

Open
tomaz opened this Issue Feb 27, 2011 · 1 comment

2 participants

@tomaz
Owner
tomaz commented Feb 27, 2011

appledoc warns when encounters something like [object doSomething:] inside code section or example block. Many times this is just used as an example to make the documented entity more understandable. This could be suppressed for at least example blocks. For code spans it's more tricky as cross refs to known objects are often embedded inside one.

See also #77.

@LearnCocos2D

+1

I'm wondering if these invalid cross ref warnings might lead to this particular problem here: #491

Because the file in question generates 2-3 such warnings. Will test. ... Hmmm, nope, fixing the cross-ref warnings had no effect on #491 unless maybe I need to fix all 40+ of them in other classes, too.

@jodyhagins jodyhagins added a commit to jodyhagins/appledoc that referenced this issue Sep 6, 2015
@jodyhagins jodyhagins Ignore source-code-blocks while processing comments.
Appledoc gives warnings when it encounters parsing issues inside
source code blocks.  In particular, it looks for style markup and
reference links.  These are especially bad within ObjectiveC
source code example blocks because of the ObjectiveC bracket
syntax and the obligatory underscores for category methods on
Cocoa classes.

This is similar to bug #72, but not exactly.  I noticed that in
another similar report, these issues are gone in version 3, so I
didn't bother trying to fix this completely.

Basically, the code intercepts the markdown processing, and looks
for any sections within documentation blocks that are marked with
either @code/@endcode of the ~~~/~~~ and ```/``` markdown syntax.

If it finds those blocks, it will output them as markup (making
sure to use the backtick format), and skip any further processing
for that block of text.
dfecc85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.