Repository navigation
Keep an all-caps possessive after a lowercased capital run in its word [patch] - #153
Open
matt-edmondson wants to merge 1 commit into
Open
matt-edmondson wants to merge 1 commit into
matt-edmondson wants to merge 1 commit into
Conversation
…d [patch] In "o'NEIL'S" the run "NEIL" is lowercased because it follows a lowercase letter, but at the second apostrophe lowercaseSuffix was recomputed from the original input, where the letter before it is the capital "L". The "S" stayed uppercase, so "oneilS" split into "oneil S". A run that is already being lowercased now counts as lowercase for the suffix after it. Fixes #148 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW6QSBbC4yjv9GxYCN1
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #148
What changed
In the apostrophe branch of
ReplaceNonAlphaNumericWithSpace,lowercaseSuffixis now computed as the issue suggests:The run before a second apostrophe (
NEILino'NEIL'S) is already being lowercased, so it now counts as lowercase. The all-caps suffix after it is lowercased too, rather than leavingoneilSforSplitOnCaseChangeto split.lowercaseNextLetterneeded no change: a letter is lowercased when either flag is set, so the correctedlowercaseSuffixcovers it.Tests
New rows in
ApostropheWithinWordShouldNotSplitIt(Pascal, camel, snake, kebab and macro):o'NEIL'Sando’NEIL’S→oneilsd'ARTAGNAN'S sword→dartagnans_swordl'API'S→lapisO'NEIL'S→oneils(control)With the fix reverted, the first four fail. With it, the full suite passes on net10.0, including the existing #88, #128 and #135 rows.
Per the triage note, this may conflict textually with #146, which changes nearby apostrophe handling.
Generated by Claude Code