mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
The details markdown extension registered a bare `<details` string as its marked start hook, which @tiptap/markdown turns into a raw indexOf scan over unlexed block source. A `<details>` mention inside backtick code spans or fenced code therefore split the surrounding paragraph and let marked's own HTML-block rule swallow the remaining prose into a details node, corrupting the saved file. findDetailsBlockStart replaces the literal start hook with a scan that skips fenced and code-span ranges and requires the tag to open a line per CommonMark's HTML-block rule. matchDetailsHtmlBlock's tag-depth pairing scan gets the same code-span exclusion, fixing a related gap where a </details>-shaped code span inside a real block's body could close the tag pairing early. The scanning helpers move to markdown-scan-ranges.ts to keep details-markdown-html.ts under the project's max-lines limit. # Conflicts: # src/renderer/src/components/editor/details-markdown-html.ts