Commit 1d4914c7 authored by Fred Chasen's avatar Fred Chasen

Switch back to using nodeBefore for finding previous node with a break statement

parent 78e252c1
Pipeline #511 passed with stage
in 3 minutes and 43 seconds
......@@ -14,7 +14,8 @@ import {
needsPageBreak,
needsPreviousBreakAfter,
nodeAfter,
displayedElementBefore, previousSignificantNode,
nodeBefore,
previousSignificantNode,
prevValidNode,
rebuildAncestors,
validNode,
......@@ -452,7 +453,7 @@ class Layout {
isFloat = styles.getPropertyValue("float") !== "none";
skip = styles.getPropertyValue("break-inside") === "avoid";
breakAvoid = node.dataset.breakBefore === "avoid" || node.dataset.previousBreakAfter === "avoid";
prev = breakAvoid && displayedElementBefore(node, rendered);
prev = breakAvoid && nodeBefore(node, rendered);
br = node.tagName === "BR" || node.tagName === "WBR";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment