Skip to content
New issue

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

<mj-raw> contents must be in a new line to be output unmodified #1358

Closed
gileri opened this issue Sep 25, 2018 · 5 comments
Closed

<mj-raw> contents must be in a new line to be output unmodified #1358

gileri opened this issue Sep 25, 2018 · 5 comments
Milestone

Comments

@gileri
Copy link
Contributor

gileri commented Sep 25, 2018

The following snippet will only output the second <?php endif ?>

<mj-raw><?php endif ?></mj-raw>
  <mj-raw>
  <?php endif ?>
</mj-raw>

Verifiable on try-it-live

Expected behavior:

<mj-raw> contents should be output, untouched, even if the opening tag, content and closing tag are on the same line.

Observed behavior:

<mj-raw> contents may be parsed/modified if the tags and content are on the same line

MJML version:

mjml-core: 4.1.2
mjml-cli: 4.1.2
Current mjml try-it-live

@gileri gileri changed the title <mj-raw> content must be in a new line to avoid being parsed <mj-raw> contents must be in a new line to be output unmodified Sep 25, 2018
@iRyusa
Copy link
Member

iRyusa commented Sep 25, 2018

Thanks for reporting this, we'll take a look at it.
Parser issues are quite hard to fix, so we're not expecting to have a quick fix for now, sorry about that

@gileri
Copy link
Contributor Author

gileri commented Sep 26, 2018

Yes that's a whole can of worms I suppose, but as the workaround is quite easy (putting mj-raw content on a newline), the issue is less impacting.

Maybe it could be useful in the component documentation to either point to this issue or explain the workaround there.

@kmcb777 kmcb777 added this to the 4.3 milestone Oct 23, 2018
@iRyusa
Copy link
Member

iRyusa commented Nov 29, 2018

Looks like we've found a fix about this, so let's hope it will be fixed in 4.3 👍

@iRyusa iRyusa closed this as completed in b97ec7e Jan 3, 2019
@kmcb777
Copy link
Collaborator

kmcb777 commented Jan 3, 2019

Hi @gileri, we included the fix for this in the new 4.3 release, feel free to try it out !

@gileri
Copy link
Contributor Author

gileri commented Jan 10, 2019

It works fine in 4.3.1, thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants