mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-28 20:37:10 -06:00
"- ", "1. " and the other list triggers only turned into a bullet or numbered item when they were the paragraph's entire content (caret at the paragraph's end). Typing one at the start of a paragraph that already has more text after the caret — the common case of going back to bulletize an existing line — left it as literal text instead. Checked in Word for Windows: it triggers on the paragraph's first characters regardless of what follows, keeping the rest of the text after the new list marker. Fix: match the pattern against the text up to the caret (not the whole paragraph), and strip only that matched prefix, not the paragraph's entire text. Regression test reverse-verified: fails with the old whole-paragraph check reinstated (the old behavior literally reproduces the report — "- " stays as typed text instead of becoming a bullet), passes with the fix. Full cargo xtask ci passes except the pre-existing, machine- specific a_thai_run_with_latin_falls_back_to_one_face failure (also fails identically on a clean upstream/main checkout). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>