-
Notifications
You must be signed in to change notification settings - Fork 210
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
Documenting Handlebars helpers #68
Comments
Escape them them a |
I set up the code as:
However, that still gives me a warning when I build:
If I do
it works, but it also displays in the end the same way so I'd have to change the builder to swap that out. |
You have to escape both sides of the handlebars In my local tests, both of these work (auto escape in code block):
And with the slashes
|
This works, but not for code blocks, either indented or backtick. One error looks like this:
|
Further examination leads me to believe that it's not the code block that's actually the problem. Instead it appears that only the first commented out helper is ignored. It seems as if Handlebars is still attempting to parse the first helper in some fashion. |
See also http://yuilibrary.com/projects/yui3/ticket/2532750 - the YUI3 API docs are wrong due to this issue. When I copy https://github.com/yui/yui3/blob/master/src/handlebars/js/yui-handlebars-base-after.js and run yuidoc . , it fails with the following errors: $ yuidoc . |
I believe the problem is here:
If I remove # from {{# in the comment section, the error goes away |
@dmitris The code you linked basically is just to only reparse handlebars if there's a block helper. Apparently, all YUIDoc helpers are block helpers. The problem still stands that there's no way to escape handlebars helpers to avoid processing. |
I think the proper way to escape handlebars helpers should be documented at the end of http://yui.github.com/yuidoc/syntax/index.html, maybe in the separate subsection "Escaping Handlebars Helpers Syntax" |
@dmitris Agreed. My problem is that I can't even find a way that works. Much less one that is documented. |
Yeah, yuidoc tries to "reparse" the code if it finds a helper so they can be used in your docs. It may be stripping the escape the first time & trying to handle it the second time. I'll look into this tomorrow. |
http://yui.github.com/yuidoc/syntax/index.html says in "Extra formatting": but is it "may use" or "must use"? Markdown lists a number of characters for which there is an escape sequence: Which of them should be escaped in the yuidoc comment blocks and in which cases? @wagenet I understand that there is some prerequisite work, possibly yuidoc fix that needs to be done - just wanted to put thoughts about documentation for later |
This is in 0.3.23 |
I'm attempting to write documentation for Handlebars helpers. Unfortunately, YUIDoc wants to evaluate all of them. Is there a workaround?
The text was updated successfully, but these errors were encountered: