-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
HTML TODOs #5098
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
Description
This issue tracks HTML issues that should be done before the public release.
Please take a look at #5259, which should address this issue.
Try out the current experimental HTML support:
yarn add prettier/prettier
yarn prettier filename.html
or preview playground in #5135.
| icon | description |
|---|---|
| ✔️ | merged |
| 👀 | in review |
| 🔜 | #5259 |
| 🏃 | WIP |
Features
- support front matter
- support pragma
- 🔜
- unambiguous/XHTML-compatible output for void tags (e.g.,
<br />) (reason) - html in js template literal (comment)
- 🔜
- whitespace-sensitive formatting (comment)
- recognize CDATA (comment)
- 🔜
- template languages
- format interpolation
{{ js expression }}(comment)- 🔜
maybe support bracketSpacing?(no, it's not supported in JSX)
- Angular
- format attribute binding syntax (
*ngIf,[target],(target),[(target)])- 🔜
- format inline template (
@Component({ template: `html` }))- 🔜
- format attribute binding syntax (
- Vue
- format attribute binding syntax (
:class,v-if,v-bind:id,@click)- 🔜
- format attribute binding syntax (
- format interpolation
Bug fixes
-
exclude comments from fragment detection(outdated) - remove extra trailing newline for
<template>(repro) - add missing trailing newline for
<style>(repro) - preserve HTML entities
- preserve case-sensitive tags
- preserve case-sensitive attributes
- fix(html): preserve case-sensitive attributes #5109
- non-HTML attributes should be considered case-sensitive (repro, comment)
- support custom self-closing tags (repro)
feat(html): support custom self-closing tags #5117feat(html): switch to htmlparser2 #5127- disable custom self-closing recognition in
--parser htmland enable it in--parser vue(comment)- 🔜
- do not format custom script (repro, comment)
- no inconsistent output for 2+ attributes (repro, comment 1, comment 2)
- force break tag if there're multiline attributes (repro, comment)
Chores
- playground
- switch to
htmlparser2 - rename
--parser parse5with--parser html - update homepage
(If you report an issue here, I'll update the list and hide your comment to keep this thread clear.)
Reactions are currently unavailable
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!