-
Notifications
You must be signed in to change notification settings - Fork 19
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
Enable use of directive leading character (:fallen_leaf: or @) within docstring content #33
Comments
👍 I'd like to document decorators in some TypeScript usage examples soon, at which point I'll need to fix this. |
This just bit me. I have the leafdoc directive character set to /*
@example
`cat foo.txt | split -d '@'`
*/ The |
Thinking to add an escaping feature. I'm thinking of two options:
@ghybs Do you have a preference? Or do you imagine some better way to handle it? |
Hi @trusktr! Thank you for taking the lead on this. I also do appreciate that you ask for opinion. I must admit I am no longer aware of the internals of leafdoc, so I would say just use whatever seems easier to you. The 2 proposed options are indeed the classic escape conventions (doubling the special character, e.g. like in CSV, and prefixing with a backslash, like in RegEx, which is also used for other special characters). In any case I think the most important would be to highlight it in documentation, since as shown above, there is no single universal convention. |
Thinking further about it, while the 2nd option might seem "more recent", it does create a new special backslash character. Then you end up with the veeery edge case where someone would really want to display Whereas the 1st option keeps the special meaning to the single specified directive character, and can naturally render |
I think you're right! The double directive character seems like a better option. |
Original issue: Leaflet/Leaflet#5668
Example (using "
@
" as the leading character like in Leaflet):The "
and now testing the "@" symbol
" line does not appear in the generated HTML output.Might be interesting detecting the leading character (:fallen_leaf: or
@
or whatever) only if it appears at the beginning of the line?Or warn that it should not be used within the content?
The text was updated successfully, but these errors were encountered: