-
Notifications
You must be signed in to change notification settings - Fork 634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added extra options to exclude symbols, and local auto-generated cross-references #397
base: master
Are you sure you want to change the base?
Conversation
…+ or - leader for local auto-linked cross-references, to reduce false links.
Looks great, thanks for your suggestion. I'll leave it to tomaz to merge this pull request. Does this update also affect the recent additions of NS_ENUM constants? |
Hi
if you use the new --require-leader-for-local-crossrefs flag, either you have to add a prefix ('leader') of '-' or '+' (it will be stripped in the final docs), or the property/enum value will not be auto-linked. In the case of local references that might be auto-linked simply by matching a word, a manual marker is the only way to reduce false-positives. As the new flag is not the default, it will not affect current appledocs. We could add other leaders for properties and enums (e.g. '@' or '=', or both), bearing in mind that the different leaders are there for readability of the 'raw' comments -- they will all be treated the same by appledoc. Another change that I think would help would be to check for word-boundaries for auto-linking local references: at the moment, auto-linking will happen even if the symbol name is embedded in a word! I was using this to generate docs for ReactiveCocoa, which has symbols 'and' 'or', 'from', etc. That highlighted every 'and', even when it was part of another word, e.g. 'brand'. Best On 31 Aug 2013, at 21:10, robvdveer [email protected] wrote:
|
Cool, thanks! Although In this moment I don't remember why I used char-boundary detection, there is word boundary detection in there. I was probably hitting some edge cases. Tom |
Hi Tom I can do the change this weekend (bit busy this week). another option for a leader/prefix (in regex-speak): i.e., Happy to take a vote! --Anthony |
I believe charbound detected was used for cases where a token needs to be detected inside a code fragment. In a previous session, i already noticed that and suggested it to be token-based, not character based.
On Tue, Sep 3, 2013 at 1:09 AM, Whirliwig [email protected]
|
If you make the option take regex (similar to |
@robvdveer I totally agree - comment preprocessing desperatly needs update. It's hacky partially due to how discount (Markdown library used to produce html) works. Originally I used custom Markdown parsing and it was much cleaner, but missing features, especially for static documents, so I eventually replaced it with more feature-rich library but lost feedback for type of blocs certain text belongs to (primarily code blocks which should be left untouched). I played with sundown library for 3.0 which has callbacks so I can only process stuff when outside code blocks etc. |
Hi,
I want to use appledoc to generate documentation for a large project, and it works very well (thanks for writing it!).
I had two issues, which this pull request addresses.
I have also added two test cases for the new arguments.
Best Regards
--Anthony