mirror of https://github.com/vector-im/riot-web
Merge pull request #3274 from matrix-org/bwindels/fixpostcodeblocknewline
Fix newline not being appended to code block while converting message to markdownpull/21833/head
commit
98c0232a96
|
@ -192,8 +192,11 @@ function parseHtmlMessage(html, partCreator) {
|
|||
if (lastNode && lastNode.nodeName === "BLOCKQUOTE") {
|
||||
parts.push(partCreator.newline());
|
||||
}
|
||||
lastNode = null;
|
||||
return checkDecendInto(n);
|
||||
const decend = checkDecendInto(n);
|
||||
// when not decending (like for PRE), onNodeLeave won't be called to set lastNode
|
||||
// so do that here.
|
||||
lastNode = decend ? null : n;
|
||||
return decend;
|
||||
}
|
||||
|
||||
function onNodeLeave(n) {
|
||||
|
|
Loading…
Reference in New Issue