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
Many developers use handlebars to generate HTML markup. But the current syntax makes it impossible to use handlebars for static markup generation with frameworks like AMP and others because of the conflict in the syntax, For example: {{...}} has a special meaning in both handlebars and AMP
We need to have a new parserOption to allow developers to define the number of mustache braces the parser needs to find before processing it as a mustache construct (MustacheStatement, BlockStatement, DecoratorBlock, PartialStatement e.t.c).
For example, the default right now is 2 - because it takes 2 consecutive mustache braces for the parser to determine that we have a mustache construct, i.e. {{....}}.
Developers should have the ability to set this value to 1 for instance - if they are generating markup for frameworks like AMP and others in which 2 consecutive mustache braces i.e. {{...}} already have special meaning
The text was updated successfully, but these errors were encountered:
tonyobanon
changed the title
Add parserOption to allow developers define what mustache construct looks like
Add parserOption to allow developers define what a mustache construct looks like
Mar 8, 2023
The spec is compiled to JS and shipped via npm. I think in order to allow different mustache-syntax, the generated parser would have to be able to set different syntax dynamically, and I think https://github.com/zaach/jison can't do this.
Many developers use handlebars to generate HTML markup. But the current syntax makes it impossible to use handlebars for static markup generation with frameworks like AMP and others because of the conflict in the syntax, For example: {{...}} has a special meaning in both handlebars and AMP
We need to have a new parserOption to allow developers to define the number of mustache braces the parser needs to find before processing it as a mustache construct (MustacheStatement, BlockStatement, DecoratorBlock, PartialStatement e.t.c).
For example, the default right now is 2 - because it takes 2 consecutive mustache braces for the parser to determine that we have a mustache construct, i.e. {{....}}.
Developers should have the ability to set this value to 1 for instance - if they are generating markup for frameworks like AMP and others in which 2 consecutive mustache braces i.e. {{...}} already have special meaning
The text was updated successfully, but these errors were encountered: