Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix block quotes all being on a single line #711

Merged
merged 1 commit into from
Feb 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/Markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down