Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
6.6 KiB
FAIL
-
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/insert.rs:32— Inserting a block can panic at valid source carets in heading syntax. On# alpha, put the caret at byte 0 and runRule:backslicestext[2..0]. A caret within the closing hashes of# alpha ###similarly panics inforthat line 44. The heading body bounds exclude these valid caret positions, but the splitter assumes the selection is inside them. Validate/map syntax positions before slicing, or return an explicit refusal. Both paths were reproduced inprobes.log. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/list.rs:190— Converting a mixed GFM list to a task list clears existing completion states. With- a\n- [x] b, runTaskListonb: the result is- [ ] a\n- [ ] b.markeralways emits an unchecked box. Typora's task conversion sets item style without clearingchecked; this command is not a task-status command. Preserve existing checked values when adding task markers to the other items. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/quote.rs:70— Unwrapping a nested alert deletes its enclosing list item's opener. On- > [!NOTE]\n > a\n- b, runQuoteona: the output isa\n- b, which markdown-rs reads as a top-level paragraph followed by a one-item list. Deleting the complete marker line also deletes the outer-. Remove only the alert's own marker and transfer any enclosing container opener to the surviving content. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/insert.rs:304— Splitting a paragraph ignores inline syntax crossing the caret. InsertRulebetweenbandcin**abcd**: the result is**ab\n\n---\n\ncd**, so both fragments lose bold and display literal asterisks. Typora'ssplitAtusessmartSplitto close and reopen inline pairs. Preserve those pairs across the inserted block, and explicitly refuse boundaries that cannot be split safely. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/list.rs:188— Retyping a list consumes first-line code indentation as marker whitespace.- codecontains an indented code block, butOrderedListproduces1. code, whose item contains ordinary prose. The replacement removes every space after the marker, although CommonMark treats excess spaces as content indentation. Retain that excess indentation while replacing the list marker and adjusting continuation lines. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/insert.rs:331—ParagraphBeforedetaches the first paragraph from its list item. On- a, it produces- \n\n a; markdown-rs reads an empty list followed by a top-level paragraph, rather than retainingainside the item. The existing test checks this exact string without checking its parsed structure. Handle a first child's container opener when making room, or refuse an unrepresentable insertion; preserve the original list membership. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/insert.rs:390— Deleting a block can merge untouched neighboring paragraphs. Inp\n# h\nq, delete the heading: the result isp\nq, one paragraph instead of the original two surrounding paragraphs. The deletion removes the only block boundary and never checks the resulting adjacency. Leave a separating blank line when removing the block would otherwise join its neighbors. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/heading.rs:107— Turning prose into an ATX heading can remove visible text.Heading(1)onalpha #writes# alpha #; markdown-rs now treats the final hash as a closing delimiter and the heading text becomes onlyalpha. Protect literal text that acquires heading-syntax meaning when adding the opening hashes, and verify the parsed heading text remains unchanged. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/heading.rs:133—Paragraphcan create another block type instead of a paragraph. On# - alpha, removing the heading marker produces- alpha, a list item. Only removing the old syntax is insufficient when the remaining text is a block opener. Escape newly active block syntax while preserving the heading's inline content so the result actually parses as a paragraph. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/quote.rs:111— Quoting a task item's first paragraph reports success but creates no quote.Quoteon- [ ] aproduces- [ ] > a; markdown-rs reads the task's text as literal> a, with no blockquote. This is the same GFM first-line restriction already handled for heading commands. Produce a valid nested block without changing the task, or return an explicit refusal instead of inserting an ineffective marker. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/insert.rs:282— Inserting at the start of a task item's text also treats that text position as a block boundary. On- [ ] ab, put the caret beforeaand runRule: the output is- [ ] ---\n\n ab, containing no thematic break.CodeBlockthere similarly puts the opening fence in task text rather than creating the requested code block. Check this boundary before writing block syntax; preserve the task and emit a real block, or refuse explicitly. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/list.rs:47— A selection starting in a list item bypasses sibling-range handling even when it ends outside that list. In- a\n\nb, select fromathroughband runOrderedList: only the first list is retyped to1. a; the selected paragraphbis left outside. Determine the selection's common holder before taking the existing-list shortcut, and apply the command to all touched siblings as required by the accepted selection rule. -
C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block/heading.rs:21— Selecting the current heading level incorrectly toggles it to a paragraph.Heading(2)on## alpharemoves its heading. Typora's actual Paragraph menu callschangeBlock(e)with one argument; its same-level toggle requires a truthy third argument, so the menu leaves this heading unchanged. Executing the extracted function with that menu call confirmed zero mutations (typora.log). Make explicit heading-level commands idempotent, and correct the test and AGENTS.md claim that currently require the toggle.