Skip to content

Commit

Permalink
Fix angular unstable expression binding (#7924)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Apr 2, 2020
1 parent 93aa378 commit bcf99ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/language-js/printer-estree.js
Expand Up @@ -3629,7 +3629,7 @@ function printPathNoParens(path, options, print, args) {
case "NGEmptyExpression":
return "";
case "NGQuotedExpression":
return concat([n.prefix, ":", n.value]);
return concat([n.prefix, ": ", n.value.trim()]);
case "NGMicrosyntax":
return concat(
path.map(
Expand Down
8 changes: 4 additions & 4 deletions tests/html_angular/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -464,7 +464,7 @@ trailingComma: "none"
[target]="a"
[target]="a // hello"
[target]="a.b"
[target]="javascript: 'hello world' "
[target]="javascript: 'hello world'"
[target]="a?.b()"
[target]="a?.b"
[target]="this.a"
Expand Down Expand Up @@ -734,7 +734,7 @@ printWidth: 80
[target]="a"
[target]="a // hello"
[target]="a.b"
[target]="javascript: 'hello world' "
[target]="javascript: 'hello world'"
[target]="a?.b()"
[target]="a?.b"
[target]="this.a"
Expand Down Expand Up @@ -1604,7 +1604,7 @@ printWidth: 80
[target]="a"
[target]="a // hello"
[target]="a.b"
[target]="javascript: 'hello world' "
[target]="javascript: 'hello world'"
[target]="a?.b()"
[target]="a?.b"
[target]="this.a"
Expand Down Expand Up @@ -1875,7 +1875,7 @@ printWidth: 80
[target]="a"
[target]="a // hello"
[target]="a.b"
[target]="javascript: 'hello world' "
[target]="javascript: 'hello world'"
[target]="a?.b()"
[target]="a?.b"
[target]="this.a"
Expand Down
4 changes: 0 additions & 4 deletions tests_config/run_spec.js
Expand Up @@ -29,10 +29,6 @@ const unstableTests = new Map(
"comments/tagged-template-literal.js",
"comments_closure_typecast/iife.js",
"graphql_interface/separator-detection.graphql",
[
"html_angular/attributes.component.html",
(options) => options.printWidth === 1,
],
"markdown_footnoteDefinition/multiline.md",
"markdown_spec/example-234.md",
"markdown_spec/example-235.md",
Expand Down

0 comments on commit bcf99ad

Please sign in to comment.