Skip to content

Keep a decimal point when the sentence ends with a period - #222

Merged
mmmaat merged 2 commits into
bootphon:masterfrom
SashaMIT:codered-decimal-punct
Sep 28, 2026
Merged

mmmaat merged 2 commits into
bootphon:masterfrom
SashaMIT:codered-decimal-punct

Conversation

@SashaMIT

Copy link
Copy Markdown
Contributor

preserve of 3.14 is pi. came back as 3. and 14 is pi.. 1.5. came back as 1. and 5.. The matcher already skips a period that sits between digits, but the cut searched for that period again, so the sentence-final period also split the number. see 3.14! stayed one chunk, because that mark is not a period. 19,99 euro still stays together.

The new cases are in test_decimal_separator_preserve_restore.

preserve() searched for the matched punctuation text, so a final period also split 3.14.
@mmmaat

mmmaat commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

Thanks for your PR. Please update the CHANGELOG as well, and if the tests pass I'll merge it.

The maintainer asked for a changelog entry before merge.
@SashaMIT

Copy link
Copy Markdown
Contributor Author

Thanks for the note. The changelog now has an unreleased bugfix entry for this.

@mmmaat
mmmaat merged commit 8b22557 into bootphon:master Sep 28, 2026
7 checks passed
@mmmaat

mmmaat commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

thanks!

@SashaMIT

Copy link
Copy Markdown
Contributor Author

Thanks for merging this.

SashaMIT added a commit to SashaMIT/oss-contributions that referenced this pull request Sep 28, 2026
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