Files
Elian DoranandClaude Opus 5.5 0591905f08 fix(export/markdown): indent nested lists under ordered items 10 and up
The list item rule indented a nested block by a fixed four spaces, but an
ordered item's prefix is `${n}.  `: four characters for items 1-9, five
from item 10, six from item 100. CommonMark only nests a block that
reaches the item's content column, so from item 10 onward the exported
sub-list sat one column short and the Markdown importer (`marked`) read
it as a lazy continuation of the parent's text:

    29.  LLM:
        1.  Detect GitHub Copilot shims.   <- becomes "LLM: 1. Detect..."

That broke the export/import cycle `pnpm edit-docs:sync-docs` runs over
the docs: the v0.106.0 release note, written in Trilium, was exported
with the short indent and every later sync collapsed item 29's sub-list
into one line.

An ordered item now indents by its prefix width, as upstream turndown
does. Bullets and task items keep four spaces, which already reach their
content column. The v0.106.0 note is re-indented to what the fixed
exporter writes.

The round-trip spec exercises items 9, 10 and 100 in lists starting at 1:
the importer drops `<ol start>`, which is a separate bug.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-28 18:26:21 +03:00
..