tests: Fix invalid HTML in contentcollector tests

The HTML spec does not permit `<pre>` as a child of `<p>`.
This commit is contained in:
Richard Hansen 2021-01-24 03:31:45 -05:00 committed by John McLear
parent 53160f4a21
commit 32a0df4883

View file

@ -221,11 +221,11 @@ const tests = {
multiLineParagraphWithPre: { multiLineParagraphWithPre: {
description: 'lines in preformatted text should be kept intact', description: 'lines in preformatted text should be kept intact',
html: `<html><body><p> html: `<html><body><p>
а б в г ґ д е є ж з и і ї й к л м н о<pre>multiple а б в г ґ д е є ж з и і ї й к л м н о</p><pre>multiple
lines lines
in in
pre pre
</pre></p><p>п р с т у ф х ц ч ш щ ю я </pre><p>п р с т у ф х ц ч ш щ ю я
ь</p> ь</p>
</body></html>`, </body></html>`,
expectedLineAttribs: ['+11', '+8', '+5', '+2', '+3', '+r'], expectedLineAttribs: ['+11', '+8', '+5', '+2', '+3', '+r'],
@ -242,8 +242,8 @@ pre
description: 'pre should be on a new line not preceeded by a space', description: 'pre should be on a new line not preceeded by a space',
html: `<html><body><p> html: `<html><body><p>
1 1
<pre>preline </p><pre>preline
</pre></p></body></html>`, </pre></body></html>`,
expectedLineAttribs: ['+6', '+7'], expectedLineAttribs: ['+6', '+7'],
expectedText: [' 1 ', 'preline'], expectedText: [' 1 ', 'preline'],
}, },