Update angular-html-parser (#6785)

Fixes #6749. Closes #6784.
master
Simon Lydell 2019-11-02 15:58:28 +01:00 committed by GitHub
parent 3d52ab7016
commit 677b46df71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 4 deletions

View File

@ -679,6 +679,26 @@ Previously, even if the line length was shorter than `printWidth`, Prettier woul
</template>
```
#### HTML: Add support for `&excl;` and other entities ([#6785] by [@lydell])
Previously, Prettier only supported the most common HTML entities, such as `&nbsp;` and `&quot;`. Now, Prettier supports every HTML entity in the HTML spec, such as `&excl;` and `&pitchfork;`.
<!-- prettier-ignore -->
```html
<!-- Input -->
<p>Hi&excl;</p>
<!-- Output (Prettier stable)
[error] stdin: SyntaxError: Unknown entity "excl" - use the "&#<decimal>;" or "&#x<hex>;" syntax (1:6)
[error] > 1 | <p>Hi&excl;</p>
[error] | ^
[error] 2 |
-->
<!-- Output (Prettier master) -->
<p>Hi&excl;</p>
```
#### 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

View File

@ -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",

View File

@ -7,11 +7,13 @@ printWidth: 80
| printWidth
=====================================input======================================
<p>I will display &euro;</p>
<p>I will display &excl;</p>
<p>I will display &#8364;</p>
<p>I will display &#x20AC;</p>
=====================================output=====================================
<p>I will display &euro;</p>
<p>I will display &excl;</p>
<p>I will display &#8364;</p>
<p>I will display &#x20AC;</p>

View File

@ -1,3 +1,4 @@
<p>I will display &euro;</p>
<p>I will display &excl;</p>
<p>I will display &#8364;</p>
<p>I will display &#x20AC;</p>

View File

@ -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"