Repository navigation
fix(muya): only outdent a paragraph that sits in a nested list item (#5342) - #5345
Merged
Merged
Conversation
…5342) Shift+Tab decided whether to outdent by checking only that the paragraph's great-grandparent was a list item. A paragraph in `list item > block-quote > block-quote` passed that check, so `_unindentListItem` treated the inner quote as the list item and the outer quote as the list: the inner quote was moved into the outer bullet list and the outer quote level was dropped (`- a` / ` > > q` became `- a` / `> q`). Require the full chain `paragraph > list item > list > list item`; anything else is a no-op, the same as a single-level quote in a list item already was. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01KGKDSxyPk9WxU2h5DgPcWn
This was referenced Sep 14, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5342
Summary
Shift+Tab decided whether to outdent by checking only that the caret paragraph's great-grandparent was a list item. A paragraph in
list item > block-quote > block-quotepasses that check too, so_unindentListItem()treated the inner quote as "the list item" and the outer quote as "the list": the inner quote was moved into the outer list and the outer quote level was dropped._getUnindentType()now requires the full chainparagraph > (list-item | task-list-item) > (bullet-list | order-list | task-list) > (list-item | task-list-item). Anything else returnsnull, andtabHandlerthen does nothing — exactly what already happens for a single-level quote in a list item (preventDefaultis still called first, so focus doesn't move).Real Chrome (muya e2e host), click at the end of the target paragraph, Shift+Tab, type
z:- a/> > q- a\n\n> qz— quote left the list, one level lost- a\n\n > > qz(unchanged)- a/- b/> > q- a\n - b\n\n > qz— quote moved into the outer item's sublist> - a/> > > q> - a\n>\n> > qz- a/> q(control)- a/- b(positive control)- a\n- bz- a\n- bz- [ ] a/- [ ] b(positive control)- [ ] a\n- [ ] bz- [ ] a\n- [ ] bzNo renderer errors in either run.
_canIndentListItem()(Tab) already checks that the paragraph's parent is a list item, so Tab inside a nested quote keeps inserting spaces.Type of change
Test plan
paragraphContent/__tests__/unindentListChain.spec.ts:vitest run226 files / 1583 tests pass;lint(0 errors, no new warnings),lint:types,check-circularpass.Notes for reviewers [optional]
Out of scope, found while auditing the indent paths: Tab (
_indentListItem) appends the item into the previous item's last sublist without checking the item type, so- [ ] a/- b/- [ ] c+ Tab oncputs atask-list-iteminto abullet-list(and the reverse). That is the same item-type mismatch as #5341, in the indent direction.By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KGKDSxyPk9WxU2h5DgPcWn