Skip to content

Quote matching issue in ignoreCustomFragments #805

@silverwind

Description

@silverwind

Given this Handlebars template as input:

<span class="{{classes}}"></span>

When removeAttributeQuotes: true is set, the quotes will (presumably rightfully) be removed giving this result:

<span class={{classes}}></span>

To keep the quotes (because the variable can resolve to a value containing spaces) I added ignoreCustomFragments: [/"\{\{.*?\}\}"/], which results in double double-quotes like in the result:

<span class=""{{classes}}""></span>

Is that expected? It seems the value of removeAttributeQuotes has no effect on these quotes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions