Add a test for auto-closing tags.

This commit is contained in:
Danila Fedorin 2021-07-12 15:16:04 -07:00
parent 4022c6121b
commit 4b92903ddd

View file

@ -248,6 +248,14 @@ export function tests() {
];
test(assert, input, output);
},
"Auto-closed tags": assert => {
const input = '<p>hello<p>world</p></p>';
const output = [
new FormatPart("p", [new TextPart("hello")]),
new FormatPart("p", [new TextPart("world")])
];
test(assert, input, output);
},
/* Doesnt work: HTML library doesn't handle <pre><code> properly.
"Text with code block": assert => {
const code = 'main :: IO ()\nmain = putStrLn "Hello"'