Repository navigation
Keep a possessive after a lowercased all-caps run in the same word [patch] - #136
Merged
Merged
Conversation
…atch] "d'ARTAGNAN's sword" became "dartagnan_s_sword" and "o'NEIL's" became "oneil_s". The first apostrophe lowercases the capital run (#128), but the second apostrophe saw the capital N before it and uppercased the "s", which the case-change splitter then broke off. A run that is already being lowercased no longer uppercases the suffix after it, so both now convert like "D'Artagnan's sword" and "O'Neil's". Fixes #135 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW5r5WL5w6Xw9zvRF9a
matt-edmondson
force-pushed
the
fix/135-possessive-after-lowercased-caps
branch
from
October 29, 2026 04:27
692889c to
119bc66
Compare
|
This was referenced Nov 11, 2026
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 #135
What changed
"d'ARTAGNAN's sword"becamedartagnan_s_sword, and"o'NEIL's"becameoneil_s. The first apostrophe lowercases the capital run (#128). The second apostrophe then saw the uppercaseNin the original input and uppercased thes, soSplitOnCaseChangebroke it off as a separate word.In the apostrophe branch of
ReplaceNonAlphaNumericWithSpace,uppercaseSuffixis now guarded with!lowercaseSuffix. The guard reads the flag from the previous apostrophe, before it is reassigned. A run that is already being lowercased no longer uppercases the suffix after it.Tests
ApostropheWithinWordShouldNotSplitItrows ford'ARTAGNAN's sword,o'NEIL'sando’NEIL’s(typographic apostrophe), checked against pascal, camel, snake, kebab and macro. The rowsD'Artagnan's swordandO'Neil'swere added next to them as the expected-equal spellings.dotnet build CaseConverter.slnsucceeds for every target framework with no warnings.Generated by Claude Code