You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.
I noticed that HTMLBars AST does not push mustache statement styled comments into the AST, while HandleBars AST does. Is there a reason for this difference?
For example:
{{! comments }}
<div">
foobar
</div>
Handlebars AST looks like (Notice the CommentStatement element):
The more I think about this it actually seems like not a bug. If the objective of HTMLBars' parsing is to produce an AST that ultimately maps to DOM, then preserving Handlebars comments has no meaningful impact on the DOM, unlike HTML comments.
Yes, they are 100% inert but for practical reasons it would be useful to have them in the AST, e.g. for future linting tools. We may opt instead to have a separate Concrete Syntax Tree but my hunch is that there isn't enough differences between the AST and CST to merit the extra complexity.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I noticed that HTMLBars AST does not push mustache statement styled comments into the AST, while HandleBars AST does. Is there a reason for this difference?
For example:
Handlebars AST looks like (Notice the CommentStatement element):
While, HTMLBar AST does not push the comment statement into the AST elements.
The text was updated successfully, but these errors were encountered: