-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
HTML Templating requires unquoted attributes #5627
Copy link
Copy link
Labels
lang:htmlIssues affecting HTML (and SVG but not JSX)Issues affecting HTML (and SVG but not JSX)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.status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!Issues with an accompanying pull request. These issues will probably be fixed soon!
Milestone
Metadata
Metadata
Assignees
Labels
lang:htmlIssues affecting HTML (and SVG but not JSX)Issues affecting HTML (and SVG but not JSX)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.status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!Issues with an accompanying pull request. These issues will probably be fixed soon!
HTML supports unquoted attributes, we use a template language that uses unquoted attributes for templating and requires template attributes to NOT have templates. It would be ideal to support an option to not surround attributes with quotes.
Alternatively, having a "sub" HTML syntax like is done with Vue would work as well. We'd prefer to avoid forking the entire HTML plugin just to change this single format if possible.
Prettier 1.15.3
Playground link
Input:
Output:
Expected behavior:
The attribute should not be surrounded by quotes.