Closed cossssmin closed 2 years ago
@cossssmin Hi The point is finding part of the expression and in your case it turns out
1 === 1? '{{foo
If you write a regex that will search for an expression with quotes taken into account, then the question remains unresolved with an expression in attributes like
<p class="{{ dynamicClass }}">
Imagine we run PostHTML with
{ locals: { foo: 'bar' } }
on this HTML:Normally, you'd expect this to be output:
... however, I think the plugin tries to parse
'{{ foo }}'
and it fails with aSyntaxError
:I think
posthtml-expressions
should not try to parse 'expressions' inside quotes, these should be simply treated as strings and parsing should skip them.