From 72b39ca6ad5967f84989ce40bcea687c903da562 Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Mon, 10 Aug 2026 22:20:19 +0000 Subject: [PATCH] fix: a break ends its block even inside a mark span MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 keeps a blank line before the next block). --- src/styles/editor.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/styles/editor.css b/src/styles/editor.css index 09cea21..124989a 100644 --- a/src/styles/editor.css +++ b/src/styles/editor.css @@ -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; }