fix: a break ends its block even inside a mark span

A run's own formatting wraps its hard break in a span, so the block's last
element was the span, not the BR — the trailing-break BR was hidden and the
empty line the break opens went missing. LibreOffice renders it (probed: a
Word paragraph closing on <w:br/> keeps a blank line before the next block).
This commit is contained in:
Steffen Becker committed 2026-08-10 22:20:19 +00:00
1 parent 3781a79d4a
commit 72b39ca6ad
1 file changed
+3 -3
+3 -3
View File
@@ -796,9 +796,9 @@
}
/* After an inline atom ProseMirror's trailing-break BR adds a line the block has not
got, so a paragraph holding an image renders one too tall. Kept after a real BR
(it carries the caret onto the empty line) and in an empty block (its only line). */
.paper .tiptap :not(br) + br.ProseMirror-trailingBreak {
got, so a paragraph holding an image renders one too tall. Kept where the block really
does end in a break — bare, or wrapped in the mark spans of the run that carried it. */
.paper .tiptap :not(br):not(:has(br:last-child)) + br.ProseMirror-trailingBreak {
display: none;
}