Title filter capitalizes characters after the apostrophe in a contraction #93

Open
nightbook opened this Issue Feb 5, 2012 · 1 comment

Projects

None yet

2 participants

@nightbook

Hello,

I'm writing to file a minor issue, but it's cause me some grief.

With a contraction such as don't, won't shouldn't, etc. if the |title filter is applied to a string containing these then the characters after the apostrophe are considered a new word and so are capitalized.

So the sentence 'I didn't do it' when pipped through the |title filter we get:
'I Didn'T Do It' with a capital T...

Thank you

@njl njl added a commit to njl/jinja2 that referenced this issue Mar 13, 2012
@njl njl Fix to #93, this time respecting whitespace
Rejigger of title split to respect whitespace, also capitalize follow-on
hyphenated words.
8f0c8ee
@liZe
liZe commented May 31, 2013

The new implementation doesn't lower the other letters : "ABC" | title gives "ABC" (it was "Abc" before).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment