You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Forward Delete at the end of a paragraph pulls the rest of the following blockquote out of the quote #5423
Pressing forward Delete at the end of a paragraph that is followed by a blockquote merges the quote's first paragraph into it, as expected. It also moves every other paragraph of the quote out of the blockquote, so the quote disappears. MarkText 0.19.1 keeps those paragraphs quoted.
Steps to Reproduce
Create quote.md with exactly this content:
a
> p>> q
Open it in MarkText.
Click just to the right of a, so the caret is at the end of the paragraph.
Press forward Delete (⌦ on a full keyboard, fn+delete on a Mac laptop).
Choose File > Save.
Same result with the paragraph inside a list item:
- a
> p>> q
Expected Behavior
p is merged into a and q stays in the blockquote, as in 0.19.1:
ap
> q
Actual Behavior
q is no longer quoted, and the blockquote is gone:
ap
q
With more paragraphs in the quote (> q, > r), all of them lose the quote. The list-item variant gives - ap followed by a plain q inside the item.
No error dialog is shown.
Screenshots / Logs
No response
Operating System
macOS
MarkText Version
0.20.0-rc.3 (also reproduced on the current develop branch). 0.19.1 is not affected.
OS Version
macOS 27.0 (arm64)
Reproducibility
I can reliably reproduce this issue
Related
Checked by driving the packaged apps (click at the end of a, Delete, type Z): 0.19.1 saves aZp / > q, 0.20.0-rc.3 saves aZp / q.
Possible cause:Format.deleteHandler in packages/muya/src/block/base/format.ts. #4725 (fixing #1845) moves the blocks that follow the merged paragraph next to the current block whenever that paragraph sits in a different container. It is meant for list items, where the next item's nested sublist must travel up with its text, but the check does not require a list item, so the rest of a blockquote is moved too. A table's last cell followed by the same blockquote behaves the same way once #5386 is fixed (#5422).
Activity
fix(muya): keep the rest of a blockquote quoted on forward-Delete mer…
test(muya): e2e for forward Delete before a blockquote (#5423)
docs(muya): trim the forward-Delete merge comments (#5423)
fix(muya): keep the rest of a blockquote quoted on forward-Delete mer…
Merge upstream/develop (marktext/marktext) into local develop
fix: keep a quote's later paragraphs quoted on a forward-Delete join
fix: end the paragraph on a Shift+Enter that would leave an empty lin…
fix: keep a quote's later paragraphs quoted on a forward-Delete join
fix: end the paragraph on a Shift+Enter that would leave an empty lin…
fix: keep a quote's later paragraphs quoted on a forward-Delete join
fix: end the paragraph on a Shift+Enter that would leave an empty lin…