HTML TODOs
See original GitHub issueThis 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
- #5109
- non-HTML attributes should be considered case-sensitive (repro, comment)
- support custom self-closing tags (repro)
- 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 parse5
with--parser html
- update homepage
(If you report an issue here, I’ll update the list and hide your comment to keep this thread clear.)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:53
- Comments:91 (35 by maintainers)
Top Results From Across the Web
How do I get TODO comments in HTML files to show up in ...
Simple answer: NO. From: How to: Create Task List Comments. The Task List displays comments in your code that begin with the comment...
Read more >How To Create a To Do List - W3Schools
Create The To Do List. Step 1) Add HTML: Example. <div id="myDIV" class= ...
Read more >TODO comments | WebStorm Documentation - JetBrains
View the list of TODO items in the TODO tool window. The tool window consists of four tabs where WebStorm shows TODO items...
Read more >Making a ToDo List with HTML, CSS and Javascript - Medium
One of the popular projects in terms of understanding the object & class structure in Javascript is ToDo List.
Read more >Todo List using HTML CSS & JavaScript - YouTube
Todo List using HTML CSS & JavaScript | Todo List using JavaScriptIn this video, I have shown you how to create a todo...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ikatyang I just want to say thank you for all of this work. After all this time we finally will have HTML support and is thanks to you.
If you ask me, I prefer no to worry about rules or plugins, but to have a consistent format in all my files. As I do in JS. Sure, I don’t like some things Prettier does, but I learn to not care, because its better to no think about it.