We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS inside <mj-style> can use < and > characters as expected, e.g.
<mj-style>
<
>
<mj-style> .foo > a { color: black; content: "something with < or >"; } /* smiley face :-< */
</mj-style>
<style>
MJML: Beautify
<mjml> <mj-head> <mj-style> p > a { color: #002435; } </mj-style> <mj-style> /* < */ </mj-style> </mj-head> </mjml>
1.72.1
v1.0.5
Fedora Linux x64 5.19.14-300.fc37.x86_64
Managed to work around the issue using:
<!-- beautify ignore:start --> <mj-style> ... </mj-style><!-- beautify ignore:end -->
The text was updated successfully, but these errors were encountered:
I think the issue (and #25) lies in this function's logic:
vscode-mjml/src/helper.ts
Line 83 in 6417f0b
Issues I see:
Line 86 in 6417f0b
Line 96 in 6417f0b
Possible workaround is using lazy / non-hungry matchers and ditch the [<>]: <.*?style[^>]*?>(?:.+?)<.*?\/.*?style> See demo
[<>]
<.*?style[^>]*?>(?:.+?)<.*?\/.*?style>
Parsing HTML via RegEx is known to break hell loose
Sorry, something went wrong.
No branches or pull requests
Expected behavior
CSS inside
<mj-style>
can use<
and>
characters as expected, e.g.<mj-style> .foo > a { color: black; content: "something with < or >"; } /* smiley face :-< */
Actual behavior
>
or<
, the formatting breaks & does not indent (probably formats as text?)<
, additionally everything after that up to</mj-style>
is formatted in a single line<mj-style>
is replaced by<style>
(as in Format Document replaces raw <style> with <mj-style> #25)Steps to reproduce the problem
MJML: Beautify
Code sample
Specifications
1.72.1
v1.0.5
Fedora Linux x64 5.19.14-300.fc37.x86_64
Other information
Managed to work around the issue using:
The text was updated successfully, but these errors were encountered: