handlebars-lang / handlebars-lang/handlebars-parser

Add parserOption to allow developers define what a mustache construct looks like

Open
#12 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
43
Forks
19
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.