This took quite a bit longer than estimated, but was worth it as now full Markdown syntax is supported (with extensions). Instead of doing internal parsing of source code, I embedded [Discount](http://www.pell.portland.or.us/~orc/Code/discount/) for this. Check the documentation to see all options it supports! Documentation is now 100% Markdown compatible, although several appledoc features are preserved and change default Markdown syntax: - Single star is converted to strong tag instead of em as in Markdown. You can also use Markdown default double star or double underscore for the same effect! - Single star and underscore markers are still converted to strong/em combination. Markdown would otherwise convert these to strong only. - Cross references are handled the same way as before. - You can now use cross references to documented objects with arbitrary descriptions (#41) using Markdown inline links like this: `[description](Class)` or `[description]([Class method:] "title"). If the address is recognized as documented object, this will be converted to proper link using description as the text! This works for classes, categories, protocols, methods and static documents! - You can also use the same for Markdown ref links, so this: `[description]` followed by: `: Class` or `: [Class method:] "title"` is properly converted to link to object, method or static document. Generally the documentation should be backwards compatible, so most users won't notice a difference, but there are a couple of points that are handled differently now with Discount, so some may experience different layout in the generated HTML files. You should now follow [Markdown syntax](http://daringfireball.net/projects/markdown/syntax). Perhaps most noticeable: example blocks following list item are now treated as continuation of list item, whereas before they were converted to example blocks. Hopefully these changes are for the best and definitely more in-spec with Markdown... If you experience some strange behavior, open a new issue or comment on this one... *IMPORTANT:* Don't forget to update template files! *NOTE:* Actually this commit only updates version, the actual solution was implemented on a temporary branch, merged to development at b7b92f8. The actual implementation starts at 1ad2f9d and ends with 226b767. GitHub still doesn't support linking commits to issues beyond closing... Not too elegant, but this was far too large to be handled by a single commit!
… and adopted protocols. Closes #70. The documentation is now properly processed only in the original context with slightly different behavior when creating cross references to local members; these are now generated so that they can be reused from any other object as well!
… them once.
There was a remaining code, probably from copy/paste. Didn't hurt much (just required some more processor time due to repeated if), but had no place to be there... :)
…ound. We also mark the range to avoid further preprocessing!
…gned from global templates. The problem was in case global templates included the setting and had it's value set to NO. In such case setExplicitCrossref was sent with proper value, but this method always set matching cross reference markers template to "on", regardless of the value passed. This is properly handled now. Strangely nobody noticed this... Note that command line switches were correctly handled, it was just global templates that were invalid.
These should include the whole text for long description regardless of repeat first paragraph setting!
…or documentation set. Without this, some anchors cause errors with docsetutil while indexing!
… Markdown to text.
If appledoc creates a cross reference link in a text that's later on converted to code block by Markdown processor, all such links are cleaned up when creating HTML value. This is required as Markdown processor doesn't process links inside these blocks. Note that this is not the most elegant solution: first we process the text and convert to links, then we process generated HTML again and remove inserted links. Ideally, this situation should be detected while processing string and prevent creating links there in the first place. However we would require reimplementing detection of code blocks there, so at least for now, this should be good enough - as code blocks are not that common this should not affect performance too much...
When inherited documentation is copied to a method, source information includes both filenames, original and inherited. Previously it sometimes happened that the same name was repeated. This should not happen now anymore. Note that I have no idea why this was happening - it sometimes did it, sometimes not... Probably due to order of processing since we use NSSet for storing objects to GBStore.
To allow detecting documents properly, `[GBStore documentWithName:]` now accepts either name with or without `-template` prefix. Using both options within GBStore speeds up checking during processing.
Using back tick Markdown syntax for code span, prevents Markdown from processing embedded text. This is fine from Markdown point of view (i.e. create HTML examples and similar), it creates issues with appledoc as any Markdown link generated from known object, embedded inside back ticks isn't converted properly. To overcome this, we need to embed back tick inside description manually after parsing. In the same time we need to take only handle links we generate while leaving any user entered ones unchanged!
Tried this to see if Xcode3 would delimit next section with new line, but doesn't help. Will leave it as text for now - declaration formatting isn't preserved anyway.
…ext. At present only Markdown inline links are converted so instead of `[description](address "title")` we only write `description`.
This error was reported during indexing for any unknown HTML code symbol (for example `–`). Markdown processor converted plain chars into these symbols as part of the conversion and obviously docsetutil has some issues with it. The workaround was to use plain text for abstract when generating tokens files. This commit is partial fix, the following will also handle some cleaning up of the text to make it more suitable for display.
…nd of line.
…rences due to setting search range length to invalid number.
… accessible to the rest of the application.
…ment by processing methods.
…d setting for enabling/disabling prefixed selector usage when creating related items section. The setting is not wired to command line switch yet.
…lated items. Apple uses -, + or @property prefix for these.
…t member isn't. In such case, the object was converted to a link. This is properly handled now by keeping unknown remote member text (i.e. not converting at all)!