swc/crates/swc_html_minifier/tests/fixture/text/collapse-whitespace-all/input.html

290 lines
5.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<div> test </div>
<div>
<p>blah</p>
</div>
<div><p>blah</p></div>
<div>foo <a>baz</a> bar</div>
<div>foo<a>baz</a>bar</div>
<div>foo <a>baz</a>bar</div>
<div>foo<a>baz</a> bar</div>
<div>foo <a> baz </a> bar</div>
<div>foo<a> baz </a>bar</div>
<div>foo <a> baz </a> bar</div>
<div>foo<a> baz </a> bar</div>
<div>Foo Bar</div>
<div> Foo Bar </div>
<p>
The quick brown fox
jumps over the lazy
dog.
</p>
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
</ul>
<p>
Hey, I <em>just</em> found
out about this <strong>cool</strong> website!
<sup>[1]</sup>
</p>
<pre>
Text
<code>
Text
</code>
<unknown-unknown>
Text
</unknown-unknown>
</pre>
<div>foo
bar</div>
<textarea>
Foo
</textarea>
<div> <div>Text</div> </div>
<unknown> <div>Text</div> </unknown>
<div> </div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice"
style="width:100%; height:100%; position:absolute; top:0; left:0; z-index:-1;">
<linearGradient id="gradient">
<stop class="begin" offset="0%"/>
<stop class="end" offset="100%"/>
</linearGradient>
<rect x="0" y="0" width="100" height="100" style="fill:url(#gradient)" />
<circle cx="50" cy="50" r="30" style="fill:url(#gradient)" />
</svg>
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<!-- A link around a shape -->
<a href="/docs/Web/SVG/Element/circle">
<circle cx="50" cy="40" r="35"/>
</a>
<!-- A link around a text -->
<a href="/docs/Web/SVG/Element/text">
<text x="50" y="90" text-anchor="middle">
&lt;circle&gt;
</text>
</a>
</svg>
<script data-test="test">
</script>
<script>
console.log("test");
</script>
<xmp>
test
</xmp>
<div> foo <a> baz </a> bar foo <a> baz </a> bar foo <a> baz </a> bar </div>
<div>
foo <a> baz </a> bar foo <a> baz </a> bar foo <a> baz </a> bar
</div>
<div>
foo <img src="https://prettier.io/icon.png" />
</div>
<div>
text <img src="https://colourlex.com/wp-content/uploads/2021/02/vine-black-painted-swatch.jpg" alt="test"> test
</div>
<span>test<script>console.log("test")</script>test</span>
<span>test <script>console.log("test")</script> test</span>
<div>
<p>blah</p>
</div>
<div>test <br> test</div>
<div>test <wbr> test</div>
<div> a <input><!-- b --> c </div>
<div> <div>a</div> <div>b</div> </div>
<div><span> a </span> <span>b</span></div>
<div><div>test</div> <span>test</span></div>
<div>
<div>test</div>
<span>test</span>
</div>
<div>
<span>test</span>
<div>test</div>
</div>
<div>
<span>test</span>
<span>test</span>
</div>
<div>
<div>test</div>
<div>test</div>
</div>
<div>
<span>test</span>
<p>test</p>
<p>test</p>
<p>test</p>
</div>
<div>
<p>test</p>
<p>test</p>
<p>test</p>
<span>test</span>
</div>
<div>
<a href="test">
test
</a>
<a href="test">test</a>
</div>
<div>
<a href="test">test</a><a href="test">test</a>
</div>
<div>
<p>blah</p>
</div>
<div>test <button>test</button></div>
<div><button>test</button> <button>test</button></div>
<div>foo <button>test</button> foo</div>
<div>foo<button>test</button>foo</div>
<div>foo <button>test</button>foo</div>
<div>foo<button>test</button> foo</div>
<div>foo<button> test </button>foo</div>
<div>foo <button> test </button>foo</div>
<div>foo<button> test </button> foo</div>
<div><span> foo </span></div>
<p>foo <img> bar</p>
<p>foo<img>bar</p>
<p>foo <img>bar</p>
<p>foo<img> bar</p>
<p>foo <wbr> bar</p>
<p>foo <br> bar</p>
<p>foo <nobr>a</nobr> bar</p>
<div>&nbsp;fo&nbsp;o&nbsp;</div>
<div>&#8202;fo&#8202;o&#8202;</div>
<p><!-- test --></p>
<p>a <!-- test --> b</p>
<div class="leaveAlone"></div><div> foo bar </div>
<div class="leaveAlone"><div></div><span> </span> foo bar</div>
<div class="leaveAlone"><span> </span> foo bar</div>
<p>foo <span></span></p>
<p>foo<span></span></p>
<div>foo <button> test </button> foo</div>
<div>foo <button> test </button> foo <button> test </button> foo</div>
<div> foo <span>foo</span> foo</div>
<div> foo<span> foo</span>foo </div>
<div> <span>a </span> b<span> c</span> </div>
<div> <span>a </span> b <span> c</span> </div>
<div> <span>a </span> b <span>c</span> </div>
<div>foo <span> baz</span></div>
<div>foo <span>baz</span></div>
<div>foo<span> baz</span></div>
<div>foo<span>baz</span></div>
<span>test </span><span><span><span><span>foo <span>baz</span></span></span></span></span>
<span><span><span><span>foo <span>baz</span></span></span></span></span><span>test </span>
<div>test </div><span><span><span><span>foo <span>baz</span></span></span></span></span>
<span><span><span><span>foo <span>baz</span></span></span></span></span><div>test </div>
<div><div>
<!--test-->
</div></div>
<pre>
foo
<!-- bar -->
baz
</pre>
<div> a <input> c </div>
<div>Empty <!-- NOT --> </div>
<!--[if lte IE 6]>
<span>A</span> <span title=" sigificant whitespace ">blah blah</span>
<![endif]-->
<div> <a href="#"> <span> <b> foo </b> <i> bar </i> </span> </a> </div>
<div>a <!-- text --><!-- text --> b</div>
<div>a <!-- text --> b <!-- text --> c <!-- text --> d</div>
<div> <!-- test --> text <!-- test --></div>
<span> <!-- test --> text </span>
<span> text <!-- test --> </span>
</body>
</html>