- whitespace-sensitive formatting - respect css `display: block`/`white-space: pre` (data from [`html-styles`](https://github.com/marionebl/html-styles)) - support magic comment (`<!-- display: block -->`) - add an option to specify whitespace sensitivity (`--html-whitespace-sensitivity <css|strict|ignore>`) - magic comments take precedence - (default) `css`: respect default css style (safe in the most cases) - `strict`: every node is considered whitespace sensitive (the safest) - `ignore`: every node is considered whitespace insensitive (dangerous, the original behavior) - inline inline-tags - support ie conditional comment (`<!--[if IE]><![endif]-->`) - indent the script/style content - no inconsistent output for 2+ attributes - force break tag if there're multiline attributes
36 lines
393 B
HTML
36 lines
393 B
HTML
<ul><!-- 123
|
|
--><li>First</li><!-- 123
|
|
456
|
|
789
|
|
--><li>Second</li><!--
|
|
|
|
|
|
123
|
|
456
|
|
789
|
|
|
|
|
|
--><li>Second</li><!--
|
|
|
|
|
|
123
|
|
456
|
|
789
|
|
|
|
|
|
--></ul>
|
|
<span><!--
|
|
--><span>a</span><!--
|
|
--><span>b</span><!--
|
|
--></span>
|
|
|
|
<span><!-- 1
|
|
--><span>a</span><!-- 2
|
|
--><span>b</span><!-- 3
|
|
--></span>
|
|
|
|
<span><!--
|
|
1 --><span>a</span><!--
|
|
2 --><span>b</span><!--
|
|
3 --></span>
|