HTML Comments rendered with additional white space
Describe the bug
Currently, HTML comments get additional whitespace inside in the beginning and the end: <!--#TEST--> will be transformed to <!-- #TEST -->. CleverReach uses HTML comments as a programming language and doesn't support a space or any other whitespace character between the start of the comment and the command (<!--#loop #--> works, <!-- #loop # --> not).
To Reproduce Steps to reproduce the behavior:
- Create a file with this MJML code:
<mjml><!--#COMMAND#--></mjml> - Render it to HTML and compare it
Expected behavior Preserving of no or all whitespaces in HTML comments.
MJML environment (please complete the following information):
- OS: MacOS
- MJML Version: 4.15.3
- MJML tool used: mjml-cli
Did you tried to wrap in mj-raw those comment ?
Yes, to temporarily fix it. But I would like to prefer it, that MJML doesn't modify the whitespace inside an HTML comment.
Might be fixable as the space might be introduced by this https://github.com/mjmlio/mjml/blob/master/packages/mjml-parser-xml/src/index.js#L315-L326
I'll check later