question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quote matching issue in ignoreCustomFragments

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
alexlamslcommented, May 3, 2017

I see - that would be the issue as that extra whitespace shouldn’t be there.

Let me see if I can fix that.

0reactions
alexlamslcommented, May 6, 2017

@silverwind thanks for the information and sorry for the delay.

I would be grateful if you can verify whether #807 addresses your particular use case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

minhtml - npm
ignoreCustomFragments, Array of regex'es that allow to ignore certain fragments, when matched (e.g. <?php ... ?> , {{ ... }} , etc.) ...
Read more >
Of Mice and Men Quote Identification Flashcards - Quizlet
Study with Quizlet and memorize flashcards containing terms like Who said, "Someday—we're gonna get the jack together and we're gonna have a little...
Read more >
Untitled
L word quiz who are you. Lito sy video, God and marriage quotes, Don't know where i stand in my relationship? Future worksheet...
Read more >
https://raw.githubusercontent.com/assemblylanguage...
unarySlash;\n var attrs = match.attrs.map(function (args) {\n var name, value, customOpen, customClose, customAssign, quote;\n var ncp = 7; ...
Read more >
Untitled
That's one small step for man quote, Define bender gestalt test, Mckeen fkbpl, ... Isr para 2015, Home decor colour matching, Carabao tourism...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found