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

feat(mrml-core): allow to have comments at root level #414

Merged
merged 4 commits into from
Apr 20, 2024
Merged

Conversation

jdrouet
Copy link
Owner

@jdrouet jdrouet commented Apr 20, 2024

As noted by #409, we currently cannot have a comment at the root of the template like following

<!-- not allowed -->
<mjml>
<mj-body>
<!-- allowed -->
</mj-body>
</mjml>

To fix that, I introduced a Root element which will be called when doing mrml::parse or mrml::async_parse and will only return the contained Mjml component. This means that the comment will be just ignored.

@jdrouet jdrouet merged commit d615b89 into main Apr 20, 2024
10 checks passed
@jdrouet jdrouet deleted the fix-409 branch April 20, 2024 14:32
This was referenced Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant