Skip to content

Commit ad57bbd

Browse files
committed
Added test to cover tab indention
1 parent 5f1a972 commit ad57bbd

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# html5-parser specific
22
manual
33
node_modules
4-
test*.html
5-
test*.php
4+
/test*.html
5+
/test*.php
66

77
/vendor/
88
/vendor-bin/*/vendor

tests/cases/TestSerializer.php

+44
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,50 @@ public function provideCustomSerializations(): iterable {
368368
HTML
369369
],
370370

371+
// Reformat whitespace, whitespace collapsing, custom indentions, tabs
372+
[false, null, 1, false, false, true, false, false,
373+
<<<HTML
374+
<!DOCTYPE html>
375+
<html>
376+
377+
378+
379+
<head>
380+
381+
</head>
382+
<body>
383+
ook eek
384+
<pre>
385+
This should be ignored
386+
387+
also this
388+
</pre>
389+
<div></div>
390+
<p> Ook
391+
<span> Eek!</span> </p>
392+
</body>
393+
</html>
394+
HTML,
395+
396+
<<<HTML
397+
<!DOCTYPE html>
398+
<html>
399+
\t<head></head>
400+
401+
\t<body>ook eek
402+
\t\t<pre> This should be ignored
403+
404+
also this
405+
</pre>
406+
407+
\t\t<div></div>
408+
409+
\t\t<p>Ook <span>Eek!</span></p>
410+
\t</body>
411+
</html>
412+
HTML
413+
],
414+
371415
// Fragment, html elements
372416
[true, 'div', 1, true, false, true, false, false,
373417
<<<HTML

0 commit comments

Comments
 (0)