set lastNode directly when not decending
This commit is contained in:
parent
793b91be5b
commit
c53708b245
1 changed files with 5 additions and 2 deletions
|
@ -192,8 +192,11 @@ function parseHtmlMessage(html, partCreator) {
|
||||||
if (lastNode && lastNode.nodeName === "BLOCKQUOTE") {
|
if (lastNode && lastNode.nodeName === "BLOCKQUOTE") {
|
||||||
parts.push(partCreator.newline());
|
parts.push(partCreator.newline());
|
||||||
}
|
}
|
||||||
lastNode = null;
|
const decend = checkDecendInto(n);
|
||||||
return 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) {
|
function onNodeLeave(n) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue