Files
test-repo/tests/html_attributes/attributes.html
T
Ika dd4687e7ef feat(html): whitespace-sensitive formatting (#5168)
- 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
2018-10-13 13:55:38 +08:00

77 lines
1.7 KiB
HTML

<input name=address maxlength=200>
<input name='address' maxlength='200'>
<input name="address" maxlength="200">
<div class="foo"></div>
<div class="foo" ></div>
<div class="foo bar"></div>
<div class="foo bar" id="header"></div>
<div class="foo bar" id="header" ></div>
<div data-prettier></div>
<div data-prettier="true"></div>
<meta property="og:description" content="The Mozilla Developer Network (MDN) provides
information about Open Web technologies including HTML, CSS, and APIs for both Web sites
and HTML5 Apps. It also documents Mozilla products, like Firefox OS.">
<div attribute>String</div>
<div attribute="">String</div>
<div attribute=''>String</div>
<div attribute >String</div>
<div attribute = "" >String</div>
<div attribute = '' >String</div>
<div attribute >String</div>
<div attribute = "" >String</div>
<div attribute = '' >String</div>
<div attribute="attribute = attribute"></div>
<div ATTRIBUTE>String</div>
<div ATTRIBUTE="">String</div>
<div ATTRIBUTE=''>String</div>
<article
id="electriccars"
data-columns="3"
data-index-number="12314"
data-parent="cars">
</article>
<article
id="electriccars"
data-columns="3"
data-index-number="12314"
data-parent="cars">...</article>
<article
id="electriccars"
data-columns="3"
data-index-number="12314"
data-parent="cars">
...
</article>
<article
id="electriccars"
data-columns="3"
data-index-number="12314"
data-parent="cars">
</article>
<article
id="electriccars"
data-columns="3"
data-index-number="12314"
data-parent="cars">
</article>
<X>
</X>
<X a="1">
</X>
<X a="1" b="2">
</X>
<X a="1" b="2" c="3">
</X>
<p
class="
foo
bar
baz
"
>
</p>