You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-04 23:02:14 +03:00
Fix block quotes all being on a single line
Fixes https://github.com/vector-im/riot-web/issues/3154
This commit is contained in:
@@ -92,7 +92,16 @@ export default class Markdown {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toHTML() {
|
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;
|
const real_paragraph = renderer.paragraph;
|
||||||
|
|
||||||
renderer.paragraph = function(node, entering) {
|
renderer.paragraph = function(node, entering) {
|
||||||
|
Reference in New Issue
Block a user