Skip to content

Recognize right curly quotes when capitalizing title boundaries - #109

Open
Aschenbath wants to merge 2 commits into
ppannuto:mainfrom
Aschenbath:fix/oss20next-20261125-3592-titlecase-curly-quotes
Open

Aschenbath wants to merge 2 commits into
ppannuto:mainfrom
Aschenbath:fix/oss20next-20261125-3592-titlecase-curly-quotes

Conversation

@Aschenbath

Copy link
Copy Markdown

titlecase('’tis the season') currently leaves ’tis lowercase, although straight and left-curly quotes already allow initial capitalization. Include U+2019 and U+201D in the punctuation class so the existing capitalization rules also recognize right curly quotes.

Closes #106. Tests cover leading elisions, a quoted elision inside a title, small words at title boundaries, and all-capital input. The change uses the same punctuation class for both regex backends.

Validation on Windows/Python 3.12.12: five new subtests fail on the original implementation; the complete suite passes with both regex and the standard-library re fallback (13 tests, one existing skip per backend). Source/wheel builds and git diff --check pass. Other Python versions were not run.

AI assistance: implementation and tests were developed with OpenAI Codex; all reported checks were executed.

@ppannuto ppannuto left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

thanks!

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.

’tis stays lowercase: right curly quote (U+2019) is missing from PUNCT, so leading-elision words are never capitalized

2 participants