Repository navigation
Title-case a word-initial Armenian ligature, and step the scan by code point [patch] - #152
Merged
Merged
Conversation
…e point [patch] TitleCaseWordStartsWithNoSimpleTitlecase now maps U+0587 "և" (the Armenian word for "and") and U+FB13-FB17 to their full title case from SpecialCasing.txt, so "Ես և դու".ToPascalCase() keeps the boundary before "և" and converts the same as the two-letter spelling "եւ". The scan also steps by code point instead of UTF-16 code unit, so a ligature after a letter outside the BMP is no longer taken to start a word. Fixes #150 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW6QSBbC4yjv9GxYCN1
|
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 #150
What changed
FullTitlecaseWithNoSimpleTitlecasenow maps U+0587և→Եւand U+FB13–FB17 (ﬓ ﬔ ﬕ ﬖ ﬗ→Մն Մե Մի Վն Մխ), the remaining SpecialCasing.txt letters that are lowercase, have no simple title case, and start words in real text."Ես և դու".ToPascalCase()is nowԵսԵւԴու, the same as theեւspelling, and snakes back toես_եւ_դու.TitleCaseWordStartsWithNoSimpleTitlecasesteps byCodePointLength, as the other loops in the file already do.previousStartis now the start of the previous code point rather than a low surrogate, so"Hello 𝐀file".ToTitleCase()leaves thefialone and its Pascal → snake form keeps𝐀fileas one word.Tests
AWordStartingWithAnArmenianLigatureShouldBeTitleCased(6 rows:ևand each of U+FB13–FB17) checks the title case, Pascal idempotence, and the word count after Pascal → snake.ArmenianAndShouldConvertLikeItsTwoLetterSpellingchecks that Pascal/camel agree with theեւspelling and that Pascal → snake givesես_եւ_դու.ALigatureAfterALetterOutsideTheBmpShouldNotStartAWordcovers the surrogate-stepping defect.Expect possible textual conflicts with open PRs #141, #143, #146 and #147, which edit nearby code. None of them changes this function.
Generated by Claude Code