From 4b92903ddd256fd7f2baf62320176c1ebbe7b3a7 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 12 Jul 2021 15:16:04 -0700 Subject: [PATCH] Add a test for auto-closing tags. --- src/domain/session/room/timeline/deserialize.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/domain/session/room/timeline/deserialize.js b/src/domain/session/room/timeline/deserialize.js index bbe72d14..33ae7c13 100644 --- a/src/domain/session/room/timeline/deserialize.js +++ b/src/domain/session/room/timeline/deserialize.js @@ -248,6 +248,14 @@ export function tests() { ]; test(assert, input, output); }, + "Auto-closed tags": assert => { + const input = '

hello

world

'; + 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
 properly.
         "Text with code block": assert => {
             const code = 'main :: IO ()\nmain = putStrLn "Hello"'