-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Unexpected embedded formatting for Angular template #15969
Copy link
Copy link
Labels
good first issueGood fist issue!Good fist issue!lang:angularIssues affecting Angular template (not general JS/TS issues used for Angular)Issues affecting Angular template (not general JS/TS issues used for Angular)lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Metadata
Metadata
Assignees
Labels
good first issueGood fist issue!Good fist issue!lang:angularIssues affecting Angular template (not general JS/TS issues used for Angular)Issues affecting Angular template (not general JS/TS issues used for Angular)lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Prettier 3.2.4
Playground link
Input:
Output:
Expected output:
Why?
Prettier formats the content of the
templatefield in Angular's@Componentdecorator as HTML. However, it now also formats the content of a different field namedtemplateas HTML. This isn't expected.I think adding
!node.computedtoprettier/src/language-js/embed/utils.js
Lines 47 to 51 in 4b1965a