forked from mystiq/hydrogen-web
Add a test for auto-closing tags.
This commit is contained in:
parent
4022c6121b
commit
4b92903ddd
1 changed files with 8 additions and 0 deletions
|
@ -248,6 +248,14 @@ export function tests() {
|
||||||
];
|
];
|
||||||
test(assert, input, output);
|
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.
|
/* Doesnt work: HTML library doesn't handle <pre><code> properly.
|
||||||
"Text with code block": assert => {
|
"Text with code block": assert => {
|
||||||
const code = 'main :: IO ()\nmain = putStrLn "Hello"'
|
const code = 'main :: IO ()\nmain = putStrLn "Hello"'
|
||||||
|
|
Loading…
Reference in a new issue