ignoreCustomFragments do not ignore < inside regex match
even doing ignoreCustomFragments: [ /\[%.*?%]/s ], it will not ignore < inside [% %]. or example:
[%
IF 1 < 2
-%]
BLA
[%- END %]
dies with:
[09:08:02] Error in plugin "gulp-htmlmin"
Message:
Parse Error: < 2 -%] BLA rqa14zm906f0 rqa14zm906f1 ...
(it must be related to the \n, because without it, it works)
[% IF 1 < 2 -%]
BLA
[%- END %]
(this works, but please pay attention at the s flag on the regex)
using the regex /\[%[\s\S]*?%]/ it works. Why the s flag isn't working?
\s is any whitespace character \S is any non-whitespace character
You can test regular expressions at https://regex101.com/
Yes, I know. But . wit the s flag should match anything, including \n, so /[\s\S]/ and /./s should be equivalent, so, my version should work, shouldn't it?
I think we should debug this in detail. In general it should be .* or .+ as a qualifier is needed. Plus \s if relevant.