correctly parse BRs

pull/21833/head
Bruno Windels 2019-05-13 18:20:21 +01:00
parent c98e716cbd
commit eaf43d7277
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}