documents: shortcodes read per DOM text node as GitHub reads them; HTML5's p closers end a p; a TOC press follows editor anchors
CI / platforms (windows-latest) (push) Failing after 9s
CI / site (push) Successful in 22s
CI / crate (push) Failing after 10m54s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

- The first `:name:`-shaped run in a text node decides for the whole node:
  blank text or a space before it turns every shortcode, else none. Filtered
  tags are text and do not split the node. Probed on GitHub's markdown API.
- `fieldset`, `menu` and the rest of HTML5's list end an open `p`.
- `CodeEditor` carries owner anchors through each edit; the document anchors
  every heading it reads, and a TOC press goes where its anchor went.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-14 00:48:26 -04:00
1 parent a744316274
commit 8e5dad8177
12 files changed
+396 -138

No files matched your search

+3
View File
@@ -316,6 +316,9 @@ impl MarkdownDocument {
let old = self.parsed.blocks.len();
self.list
.splice(head..old - tail, read.blocks.len() - head - tail);
let headings: Vec<usize> = read.headings.iter().map(|heading| heading.at).collect();
self.editor
.update(cx, |editor, _| editor.set_anchors(headings));
self.parsed = Arc::new(read);
cx.emit(DocumentEvent::Parsed);
cx.notify();