Skip to content

[Bug] Shift+Tab in a nested blockquote inside a list item moves the quote out of the list and drops a quote level #5342

Closed

Description

@Jocs

Description

Pressing Shift+Tab inside a nested blockquote in a list item treats the quote as if it were a nested list item: the inner quote is moved out of the list into the parent bullet list, and the outer quote level is dropped. Content structure is lost (> > q becomes > q, no longer part of the list item), and the editor state ends up with a block-quote directly inside a bullet-list.

With a single-level quote (> q) Shift+Tab correctly does nothing.

No error is thrown.

Steps to Reproduce

  1. Open a document with:
    - a
    
      > > q
  2. Click at the end of q and press Shift+Tab.
  3. Switch to source code mode.

Expected Behavior

Nothing happens (the caret is not in a list item paragraph), the same as for a single-level quote, and the markdown stays - a\n\n > > q.

Actual Behavior

  • The markdown becomes - a\n\n> q: the quote has left the list item and lost one level.
  • Editor state: bullet-list( list-item(paragraph "a"), block-quote(paragraph "q") ).
  • Typing z and then pressing Backspace at the start of the moved quote gives - a\n\nqz, with a bare paragraph directly inside the list in the state: bullet-list( list-item(...), paragraph ).

Screenshots / Logs

Analysis: ParagraphContent._getUnindentType() (packages/muya/src/block/content/paragraphContent/index.ts) only checks that the paragraph's great-grandparent is a list-item / task-list-item. For list-item > block-quote > block-quote > paragraph it takes the inner quote as "the list item" and the outer quote as "the list", so _unindentListItem() clones the inner quote next to the real list item and removes the outer quote. It never checks that the parent chain is actually list-item > list. Found while reviewing #4913; the behaviour is the same on develop before and after that PR.

Reproduced in the built desktop app (Playwright + Electron) and in real Chrome against the muya e2e host.

Operating System

macOS

MarkText Version

develop @ a351c50 (the code involved is unchanged since v0.20.0-rc.2)

OS Version

macOS 27.0

Reproducibility

  • I can reliably reproduce this issue

Activity

  1. added
    🐛 bug
    🚧 needs triage
    on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bug🔭 area/muya🚧 needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions