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

[SPIKE] Trying a ground up rebuild of the printer to see what I can learn #2

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,31 @@ Previously, Prettier would sometimes ignore whitespace when formatting comments.
</div>
```

### Handlebars: Improve comment formatting ([#6234] by [@gavinjoyce])

Previously, Prettier would incorrectly decode HTML entiites.

<!-- prettier-ignore -->
```hbs
// Input
<p>
Some escaped characters: &lt; &gt; &amp;
</p>

// Output (Prettier stable)
<p>
Some escaped characters: < > &
</p>

// Output (Prettier master)
<p>
Some escaped characters: &lt; &gt; &amp;
</p>
```

[#6209]: https://github.com/prettier/prettier/pull/6209
[#6186]: https://github.com/prettier/prettier/pull/6186
[#6186]: https://github.com/prettier/prettier/pull/6206
[#6234]: https://github.com/prettier/prettier/pull/6234
[@duailibe]: https://github.com/duailibe
[@gavinjoyce]: https://github.com/gavinjoyce
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@angular/compiler": "7.2.9",
"@babel/code-frame": "7.0.0",
"@babel/parser": "7.2.0",
"@glimmer/syntax": "0.39.3",
"@glimmer/syntax": "0.41.0",
"@iarna/toml": "2.2.3",
"@typescript-eslint/typescript-estree": "1.10.2",
"angular-estree-parser": "1.1.5",
Expand Down
3 changes: 2 additions & 1 deletion src/language-handlebars/parser-glimmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ function parse(text) {
return glimmer(text, {
plugins: {
ast: []
}
},
mode: "codemod"
});
/* istanbul ignore next */
} catch (error) {
Expand Down
Loading