From 4f4e9a6c3af648658229dc249c6af6a73ff5eafc Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 17 Feb 2017 18:06:00 +0000 Subject: [PATCH] Fix block quotes all being on a single line Fixes https://github.com/vector-im/riot-web/issues/3154 --- src/Markdown.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Markdown.js b/src/Markdown.js index d6dc979a5a..4a46ce4f24 100644 --- a/src/Markdown.js +++ b/src/Markdown.js @@ -92,7 +92,16 @@ export default class Markdown { } toHTML() { - const renderer = new commonmark.HtmlRenderer({safe: false}); + const renderer = new commonmark.HtmlRenderer({ + safe: false, + + // Set soft breaks to hard HTML breaks: commonmark + // puts softbreaks in for multiple lines in a blockquote, + // so if these are just newline characters then the + // block quote ends up all on one line + // (https://github.com/vector-im/riot-web/issues/3154) + softbreak: '
', + }); const real_paragraph = renderer.paragraph; renderer.paragraph = function(node, entering) {