8000 A paragraph that opens with an ordinal is counted as one sentence by kiran-brahma · Pull Request #72 · kiran-brahma/writing-tool · GitHub
[go: up one dir, main page]

Skip to content

A paragraph that opens with an ordinal is counted as one sentence - #72

Merged
kiran-brahma merged 1 commit into
v1.3from
v1.3-51
Sep 26, 2026
Merged

kiran-brahma merged 1 commit into
v1.3from
v1.3-51

Conversation

@kiran-brahma
Copy link
Copy Markdown
Owner

Closes #51.

Implements the Writer's decision (option 1, accept and document): the metrics panel's own gloss now says that a paragraph opening with a number and a period (1984. …) is counted as one sentence, and why. The canonical string and sentences.ts behaviour are unchanged, so no stored anchor offsets move.

  • src/help/helpContent.ts: PANEL_GLOSSES.metrics.text states the limitation.
  • src/help/helpContent.test.ts: asserts the gloss states it. The existing voice, banned-word, em-dash and ordinary-case tests also pass on the new text.
  • src/core/sentences.test.ts: pins the current segmentation of 1984\. The year Orwell chose. as one sentence.
  • src/core/sentences.ts: changed the header comment only, to name the accepted limitation. No code changed.

Acceptance criteria

  • The explanation text states the limitation: verified in PANEL_GLOSSES.metrics and on screen in the Rhythm panel (pnpm dev + headless Chromium screenshot).
  • Asserted in the help content tests: verified (helpContent.test.ts, new "panel glosses" case).
  • sentences.ts behaviour unchanged: verified. No code changed, and a new pinning test plus the existing escape tests pass.
  • Canonical string not changed, so no stored anchor offsets move: verified (canonicalText.ts untouched).
  • pnpm test (999 passed), pnpm typecheck, pnpm run gates, pnpm build all pass.

Found while checking in the app, outside this ticket: when you type 1984. at the start of a line in the Editor, the ordered-list input rule turns it into a numbered list item. So in the live Editor the case usually shows up as a list rather than as an escaped paragraph.

🤖 Generated with Claude Code


Generated by Claude Code

…ence

A Paragraph that opens with an ordinal (1984. The year...) escapes to the
same canonical shape as an escaped list marker, so the sentence rule
reads it as one sentence. The Writer accepted the rule (issue #51,
option 1): the metrics gloss now states the limitation, a help content
test asserts it, and a sentences test pins the unchanged segmentation.
The canonical string does not change, so no stored anchor offsets move.

Closes #51.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Sep 26, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-26T09:33:43.418079Z a3b03e4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0