Skip to content

Fix spacing after dotted abbreviations - #370

Merged
bartekplus merged 2 commits into
masterfrom
codex/fix-issue-365-abbreviation-spacing
Jul 27, 2026
Merged

Fix spacing after dotted abbreviations#370
bartekplus merged 2 commits into
masterfrom
codex/fix-issue-365-abbreviation-spacing

Conversation

@bartekplus

@bartekplus bartekplus commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve spaces after dotted words and abbreviations without a language-specific allowlist
  • remove ambiguous code-accessor space compaction from both granular and legacy spacing rules
  • keep deterministic numeric compaction for decimals, times, and ratios
  • add unit and browser-level regression coverage for continuing after dotted abbreviations

Fixes #365

Root cause

The technical-token heuristic treated the final segment of a dotted abbreviation as a chained code accessor. When the next character was typed after the trailing space, it compacted . a to .a and removed the user's space.

Behavior choice

Dotted prose and accessor chains are indistinguishable from text alone. The rule now preserves the authored space for all dotted words, including a.m., e.g., z.B., m.in., and accessor-looking input such as a.b. c. Numeric forms such as 3. 14 and 12: 30 are still compacted.

Validation

  • bun run check
  • bun run test (1,526 passed)
  • bun run check:e2e:coverage
  • bun run test:e2e (Chrome: 26 passed)
  • bun run test:e2e --platform=firefox (26 passed)
  • bun run test:e2e:full (Chrome: 64 passed, 7 expected skips)
  • bun run test:e2e:full --platform=firefox (64 passed, 7 expected skips)

@bartekplus
bartekplus marked this pull request as ready for review July 27, 2026 19:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8017f118bb

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/core/domain/grammar/implementations/helpers/SpacingRuleShared.ts Outdated
@bartekplus
bartekplus merged commit 87b5af2 into master Jul 27, 2026
8 checks passed
@bartekplus
bartekplus deleted the codex/fix-issue-365-abbreviation-spacing branch July 27, 2026 20:22
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.

[Bug]: Can't insert space after two letters with a period

1 participant