From eaf43d7277a5239d53806a4155205b6ff43aa990 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 13 May 2019 18:20:21 +0100 Subject: [PATCH] correctly parse BRs --- src/editor/parse-event.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/editor/parse-event.js b/src/editor/parse-event.js index 51b96a58e7..455c51bcf4 100644 --- a/src/editor/parse-event.js +++ b/src/editor/parse-event.js @@ -15,7 +15,7 @@ limitations under the License. */ import { MATRIXTO_URL_PATTERN } from '../linkify-matrix'; -import { PlainPart, UserPillPart, RoomPillPart } from "./parts"; +import { PlainPart, UserPillPart, RoomPillPart, NewlinePart } from "./parts"; function parseHtmlMessage(html) { const REGEX_MATRIXTO = new RegExp(MATRIXTO_URL_PATTERN); @@ -42,6 +42,8 @@ function parseHtmlMessage(html) { default: return new PlainPart(n.textContent); } } + case "BR": + return new NewlinePart("\n"); default: return new PlainPart(n.textContent); }