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

Single Placeholder escaping is removed during formatting #54

Open
AngusMorton opened this issue Feb 4, 2024 · 1 comment
Open

Single Placeholder escaping is removed during formatting #54

AngusMorton opened this issue Feb 4, 2024 · 1 comment

Comments

@AngusMorton
Copy link
Contributor

Single escaping of placeholders is lost during formatting. This seems like a bug because it changes the meaning of the output (AFAIK), but the tests indicate it's expected.

From the tests (placeholders-body-escaped.marko):

<div>
    Hello \${data.name}!
    Messages: \$!{data.messagesHtml}
</div>

Is formatted into (placeholders-body-escaped.expected/html.marko):

<div>Hello ${data.name}! Messages: $!{data.messagesHtml}</div>

I would have expected the escaping of the placeholder to be preserved in the formatted code:

<div>Hello \${data.name}! Messages: \$!{data.messagesHtml}</div>

I'm happy to work on a fix if this is indeed a bug.

@DylanPiercey
Copy link
Contributor

That looks like a bug! If you're wanting to take a stab at fixing it that'd be much appreciated 🙏

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

No branches or pull requests

2 participants