diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index e4ade133..30a4121f 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -679,6 +679,26 @@ Previously, even if the line length was shorter than `printWidth`, Prettier woul ``` +#### HTML: Add support for `!` and other entities ([#6785] by [@lydell]) + +Previously, Prettier only supported the most common HTML entities, such as ` ` and `"`. Now, Prettier supports every HTML entity in the HTML spec, such as `!` and `⋔`. + + +```html + +

Hi!

+ + + + +

Hi!

+``` + #### JavaScript: Empty lines in destructured arrow function parameters could break indentation and idempotence ([#6301] & [#6382] by [@sosukesuzuki]) Previously, Prettier indented code strangely when an arrow function whose parameters included an object pattern was passed to a function call as an argument. Also, it broke idempotence. Please see [#6294](https://github.com/prettier/prettier/issues/6294) for details. @@ -1343,6 +1363,7 @@ test; [#6236]: https://github.com/prettier/prettier/pull/6236 [#6270]: https://github.com/prettier/prettier/pull/6270 [#6284]: https://github.com/prettier/prettier/pull/6284 +[#6785]: https://github.com/prettier/prettier/pull/6785 [#6289]: https://github.com/prettier/prettier/pull/6289 [#6301]: https://github.com/prettier/prettier/pull/6301 [#6307]: https://github.com/prettier/prettier/pull/6307 diff --git a/package.json b/package.json index a83c5d82..0fe307bd 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@iarna/toml": "2.2.3", "@typescript-eslint/typescript-estree": "2.6.0", "angular-estree-parser": "1.1.5", - "angular-html-parser": "1.2.0", + "angular-html-parser": "1.3.0", "camelcase": "5.3.1", "chalk": "2.4.2", "cjk-regex": "2.0.0", diff --git a/tests/html_symbol_entities/__snapshots__/jsfmt.spec.js.snap b/tests/html_symbol_entities/__snapshots__/jsfmt.spec.js.snap index 4e930fbf..226b0650 100644 --- a/tests/html_symbol_entities/__snapshots__/jsfmt.spec.js.snap +++ b/tests/html_symbol_entities/__snapshots__/jsfmt.spec.js.snap @@ -7,11 +7,13 @@ printWidth: 80 | printWidth =====================================input======================================

I will display €

+

I will display !

I will display €

I will display €

=====================================output=====================================

I will display €

+

I will display !

I will display €

I will display €

diff --git a/tests/html_symbol_entities/symbol_entitites.html b/tests/html_symbol_entities/symbol_entitites.html index 2ccc4ed1..4ba276d5 100644 --- a/tests/html_symbol_entities/symbol_entitites.html +++ b/tests/html_symbol_entities/symbol_entitites.html @@ -1,3 +1,4 @@

I will display €

+

I will display !

I will display €

I will display €

diff --git a/yarn.lock b/yarn.lock index b6044f5f..bf7ef034 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1214,9 +1214,10 @@ angular-estree-parser@1.1.5: lines-and-columns "^1.1.6" tslib "^1.9.3" -angular-html-parser@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/angular-html-parser/-/angular-html-parser-1.2.0.tgz#9319b8a9e06389aee2449b3a35977442512eccf3" +angular-html-parser@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/angular-html-parser/-/angular-html-parser-1.3.0.tgz#2b87c3c1b7535a972a00e35604221df3c51e6c6e" + integrity sha512-FCLuM8ZUt30qwiV5KlW8uWL9cwlS2loOIGq8wUQFypkJ1QZqJk829yxTsvp2DvCMZ7uLwfjIaIrKV5N2+RLiSQ== dependencies: tslib "^1.9.3"