You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A paragraph that opens with an ordinal is counted as one sentence #51
A Paragraph that opens with an ordinal and continues as a sentence — 1984. The year Orwell chose. —
is counted as one sentence by the rhythm metrics, not two.
src/core/canonicalText.ts — escapeBlockStart escapes the period, correctly: parseCanonical
would otherwise read the line as an ordered list (isOrderedStart is /^\d+\.(?:\s|$)/). The
escaped canonical text is 1984\. The year Orwell chose.
src/core/sentences.ts — collectSentences skips a period preceded by a backslash, because that
is how an escaped ordered-list marker (1\. not a list) reaches it.
documentMetrics, matchRepetition and the opener rules all compute over that segmentation.
Why it is genuinely undecidable as written
1. not a list and 1984. The year… are byte-identical in shape: digits, a period, a space, then
prose. The canonical string cannot distinguish "marker the Writer did not mean" from "sentence the
Writer did mean". A deterministic rule has to pick one, and the file already documents that it is a
rule and not a grammatical analysis.
Current state
Scoped, not solved: the guard now only applies to a leading ordered-marker escape, so a period
after a literal backslash inside prose (a \\. Then) does split. The line-start case above remains,
and the code comment says so.
Options for a human
Accept it and document it where the Writer can see it (the metrics panel's own explanation).
Disambiguate at the source: escape the digits rather than the period for the prose case, so the
two escapes become distinguishable. This changes the canonical string for such Paragraphs, so
stored anchor offsets move — resolveAnchor re-locates by quote, but it is a storage-adjacent
change that deserves its own review and possibly a migration note.
Origin
Found by the Thermos review (thermo-nuclear F1); partly fixed, this is the residual.
Decision (Writer, 2026-09-26): option 1, accept and document. Keep the deterministic rule. Say plainly in the metrics panel's own explanation that a Paragraph opening with a number and a period (1984. …) is read as one sentence. Do not change the canonical string, so no stored anchor offsets move. Acceptance: the explanation text states the limitation and is asserted in the help content tests; sentences.ts behaviour unchanged.
Done in #72 (merged into v1.3), per option 1: the metrics gloss states the limitation and is asserted in the help tests; sentences.ts behaviour unchanged.
Side note from the worker: typing 1984. at a line start in the Editor turns it into a numbered list (Markdown input rule), so the live Editor usually produces a list rather than this paragraph case. Worth its own ticket if that conversion is unwanted.
Activity
kiran-brahma commentedon Sep 26, 2026
Decision (Writer, 2026-09-26): option 1, accept and document. Keep the deterministic rule. Say plainly in the metrics panel's own explanation that a Paragraph opening with a number and a period (
1984. …) is read as one sentence. Do not change the canonical string, so no stored anchor offsets move. Acceptance: the explanation text states the limitation and is asserted in the help content tests;sentences.tsbehaviour unchanged.Say in the metrics panel that a number-and-period opening is one sent…
kiran-brahma commentedon Sep 26, 2026
Done in #72 (merged into
v1.3), per option 1: the metrics gloss states the limitation and is asserted in the help tests;sentences.tsbehaviour unchanged.Side note from the worker: typing
1984.at a line start in the Editor turns it into a numbered list (Markdown input rule), so the live Editor usually produces a list rather than this paragraph case. Worth its own ticket if that conversion is unwanted.Generated by Claude Code