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

[Glimmer] preserve HTML entities #6234

Merged
merged 1 commit into from Jul 8, 2019

Conversation

GavinJoyce
Copy link
Contributor

@GavinJoyce GavinJoyce commented Jun 19, 2019

fixes: #5300
supersedes #4533
part of jgwhite#1

With the following input:

<p>Some escaped characters: &lt; &gt; &amp;</p>

On master, we get the following incorrect output:

<p>
  Some escaped characters: < > &
</p>

With this PR, the entities are correctly preserved:

<p>
  Some escaped characters: &lt; &gt; &amp;
</p>
  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to the CHANGELOG.unreleased.md file following the template.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@GavinJoyce GavinJoyce force-pushed the gj/fix-glimmer-html-entities branch from caebc99 to b51d97d Compare June 19, 2019 20:12
@@ -8,7 +8,8 @@ function parse(text) {
return glimmer(text, {
plugins: {
ast: []
}
},
mode: "codemod"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this mode was introduced here: glimmerjs/glimmer-vm#938

@GavinJoyce GavinJoyce changed the title [WIP][Glimmer] preserve html entities [Glimmer] preserve html entities Jun 19, 2019
@GavinJoyce GavinJoyce changed the title [Glimmer] preserve html entities [Glimmer] preserve HTML entities Jun 19, 2019
@GavinJoyce
Copy link
Contributor Author

GavinJoyce commented Jun 27, 2019

@evilebottnawi you approved the PR that this aims to supersede, likely by mistake. Perhaps you could review this one?

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@GavinJoyce
Copy link
Contributor Author

Perhaps we could merge this? Thanks

@lydell lydell merged commit 12b8176 into prettier:master Jul 8, 2019
@GavinJoyce GavinJoyce deleted the gj/fix-glimmer-html-entities branch July 8, 2019 09:09
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Oct 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

glimmer formatter issue for special symbols &gt; and &lt;
4 participants