Browse Source

Added test to cover tab indention

pretty-print
Dustin Wilson 2 years ago
parent
commit
ad57bbd5a2
  1. 4
      .gitignore
  2. 44
      tests/cases/TestSerializer.php

4
.gitignore

@ -1,8 +1,8 @@
# html5-parser specific
manual
node_modules
test*.html
test*.php
/test*.html
/test*.php
/vendor/
/vendor-bin/*/vendor

44
tests/cases/TestSerializer.php

@ -368,6 +368,50 @@ class TestSerializer extends \PHPUnit\Framework\TestCase {
HTML
],
// Reformat whitespace, whitespace collapsing, custom indentions, tabs
[false, null, 1, false, false, true, false, false,
<<<HTML
<!DOCTYPE html>
<html>
<head>
</head>
<body>
ook eek
<pre>
This should be ignored
also this
</pre>
<div></div>
<p> Ook
<span> Eek!</span> </p>
</body>
</html>
HTML,
<<<HTML
<!DOCTYPE html>
<html>
\t<head></head>
\t<body>ook eek
\t\t<pre> This should be ignored
also this
</pre>
\t\t<div></div>
\t\t<p>Ook <span>Eek!</span></p>
\t</body>
</html>
HTML
],
// Fragment, html elements
[true, 'div', 1, true, false, true, false, false,
<<<HTML

Loading…
Cancel
Save