Merge pull request #711 from matrix-org/dbkr/fix_commonmark_quote_multiline

Fix block quotes all being on a single line
pull/21833/head
Richard van der Hoff 2017-02-20 09:19:41 +00:00 committed by GitHub
commit 7d07e7f958
1 changed files with 10 additions and 1 deletions

View File

@ -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: '<br />',
});
const real_paragraph = renderer.paragraph;
renderer.paragraph = function(node, entering) {