Skip to content

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

Open
@tonyobanon

Description

@tonyobanon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions