Repository navigation
Description
Summary
An ordered list written with parenthesis markers (1) one) is silently rewritten to period markers (1. one) the first time the document is saved from the web editor. The rendered list is identical, but the author's source style is destroyed on every open→save of such a document — the same class of silent source rewriting as #997 (start number) and #1036 (tight/loose), for the one list attribute the codec still doesn't carry.
Evidence (verified this run, main 17c2be5d)
Round-trip through the verbatim codec (probe crate, hidden_files/probe-2026-10-27-creator-a/out5.log, case paren-delim-ordered; control in probe8):
- Codec:
1) one\n2) two\n→ PMordered_listwith attrs{order: 1, tight: true}(no delimiter) → save →1. one\n2. two\n(fixpoint thereafter — the)form is unrecoverable after one save). - DIRECT comrak control (parse →
format_commonmark, no codec):1) one\n2) two\nround-trips unchanged, so the loss is in the codec, not the renderer.
Root cause, pkgs/id/src/web/markdown.rs:
- Parse direction,
NodeValue::Listarm (:254-264)::234-240) drops it the same way.ordered_listattrs store onlyorder(list.start) andtight. comrak'sNodeListcarries the marker style indelimiter: ListDelimType(Period/Paren, comrak nodes.rs:373) — it is never read. The orderedtask_listarm ( - Save direction,
ordered_listarm (:1200-1211) and ordered:1238-1244):task_listarm (NodeList { list_type: ListType::Ordered, ..Default::default() }—DefaultisListDelimType::Period, so every ordered list is emitted with.. pkgs/id/web/src/editor.ts: theordered_list/task_listschema likewise has no delimiter attr, so the editor cannot round-trip it either (cf. theorder/tightattrs added there for id(web): ordered task lists lose their ordering on save — rewritten as bullet task lists #997/id(web): loose task list items fuse on save — task_list hardcodes tight, second paragraph/code block destroyed #1036).
Why it matters
- Silent, irreversible source churn for any document authored with
)markers (a common style, and the default in some editors that users paste/import from). - It is the last uncarried
NodeListfield:start(id(web): ordered task lists lose their ordering on save — rewritten as bullet task lists #997) andtight(id(web): loose task list items fuse on save — task_list hardcodes tight, second paragraph/code block destroyed #1036) were both fixed by carrying the attr both directions;delimiterwas left behind.
Acceptance criteria
-
1) one\n2) two\nround-trips byte-identically through markdown → PM → markdown (codec test), and is a fixpoint. -
1. onelists render exactly as before (no change for period-style lists). - Ordered task lists keep their delimiter too (e.g.
1) [ ] xif the parser accepts the form; otherwise the exclusion is noted in the test). - Legacy PM docs without the new attr save exactly as today (delimiter defaults to period).
-
editor.tsordered_list(andtask_list, if applicable) schema carries the attr with a period default, mirroring the id(web): ordered task lists lose their ordering on save — rewritten as bullet task lists #997/id(web): loose task list items fuse on save — task_list hardcodes tight, second paragraph/code block destroyed #1036 pattern. - Existing
web::markdowntests still pass.
Filed by new-issue-creator (lane A) after a verified probe on current main; delimiter keyword search across open and closed issues returned no existing tracker.
Activity
developing-today commentedon Oct 27, 2026
CODE-475
dezren39 commentedon Oct 27, 2026
🤖 Agent note · state: filed
)markers are rewritten to.on save — codec drops comrak's NodeList delimiter in both directions (parse markdown.rs ~:254, save ~:1200); verified by probe + direct-comrak control on main 17c2be5.74 remaining items
dezren39 commentedon Nov 3, 2026
🤖 Agent note · parked
dezren39 commentedon Nov 3, 2026
🤖 Agent note · state: picked up
Merge pull request #4666 from developing-today/queue/6504-1380-ordere…
dezren39 commentedon Nov 3, 2026
🤖 Agent note · state: done