Skip to content
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

Unwanted output when there is special comment in template #4

Closed
sillykelvin opened this issue May 25, 2013 · 3 comments
Closed

Unwanted output when there is special comment in template #4

sillykelvin opened this issue May 25, 2013 · 3 comments

Comments

@sillykelvin
Copy link

Thanks for your great effort for fixing issue [#2], I met another issue, example code:

(mustache-render
 "{{a}}
{{!<script src=\"somescript.js\" async=\"async\"></script>}}
{{b}}"
 (ht ("a" "AA")
     ("b" "BB")))

the output is:

AA

{{b}}

As you see, the second output is affected by the comment.

However, if I wrote the comment line like this(only with attribute async removed, other lines remain unchanged):

{{!<script src=\"somescript.js\"></script>}}

then the output will be okay.

Hope my description could do little help for you to fix this issue.

Thanks

@sillykelvin
Copy link
Author

And one missing point(priority is not as high as the above one):

according to this spec(https://github.com/mustache/spec/blob/v1.0.2/specs/comments.yml#L27), standalone comment lines should be removed.

Also, if it is easy to fix, please help fix it, it is better if we could match the spec, isn't it? :-D

Thanks

Wilfred added a commit that referenced this issue May 26, 2013
Wilfred added a commit that referenced this issue May 26, 2013
@Wilfred
Copy link
Owner

Wilfred commented May 26, 2013

Thanks again for helping me shake out the bugs in mustache.el :). I've left #2 open, since we still aren't handling trailing whitespace for standalone sections or comments. Otherwise, all the issues in this ticket should be fixed.

@sillykelvin
Copy link
Author

I verified [#4] and it is okay now, thanks for your great job~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants