From f338aec89c7aa2771f60b44d85c82ad47699932a Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Wed, 2 Sep 2026 12:37:34 +0000 Subject: [PATCH] feat: a comment carries the answers to it The thread rides the comment mark's attrs, so two runs of one comment still merge back together and no second store is needed. ODF writes each answer as its own annotation over the same range, naming its comment in loext:parent-name; Word writes its own w:comment tied by w15:paraIdParent in commentsExtended.xml (both probed). Either importer folds the answers back into the comment they belong to, and the printed list carries them indented. --- src/lib/editor/extensions/CLAUDE.md | 2 +- src/lib/editor/extensions/comment.ts | 43 +++++++++++++++++++- src/lib/export/docx.ts | 61 +++++++++++++++++++++------- src/lib/export/odt.ts | 34 ++++++++++++---- src/lib/export/reviewPrint.ts | 19 ++++++++- src/lib/import/docx.ts | 38 +++++++++++++---- src/lib/import/odt.ts | 28 ++++++++++++- tests/roundtrip.test.ts | 38 +++++++++++++++++ 8 files changed, 225 insertions(+), 38 deletions(-) diff --git a/src/lib/editor/extensions/CLAUDE.md b/src/lib/editor/extensions/CLAUDE.md index 7713c72..31c6518 100644 --- a/src/lib/editor/extensions/CLAUDE.md +++ b/src/lib/editor/extensions/CLAUDE.md @@ -30,7 +30,7 @@ Five topics are large enough to have their own deep-dive — read the file befor - **`bulletList.ts`** / **`orderedList.ts`** — the TipTap lists plus a marker-type attr: `setBulletChar` (innermost list, `null` = default cycle) and the ordered numbering cycle (`utils/orderedListTypes.ts`, multilevel targets the outermost list). - **`listStyle.ts`** — the named list style (`listStyleName` on the outermost list; nested lists inherit) and the walk resolving every list's effective marker (`data-eff-list-style`, `data-bullet`+`--bullet`, indent, label alignment) from node attr > style level > depth cycle — the style level decides the depth's kind, so a number level numbers a `