gillibrand / alfred-change-case

An Alfred workflow to change the case of text on the clipboard.
114 stars 12 forks source link

Title Case doesn't work if selected text is all caps #1

Closed dlehman closed 11 years ago

dlehman commented 11 years ago

If the text selected is in all caps, the title case option doesn't work-- it leaves it as all caps.

Selected text: "This is some text" "Title Case" option returns: "This Is Some Text'

Selected text: "THIS IS SOME TEXT" "Title Case" option returns: "THIS IS SOME TEXT" Desired result: "This Is Some Text"

gillibrand commented 11 years ago

Oops. It's trying to be smart with words that are already in uppercase (HTML, ID, FYI), but that only works for text that is already mixed case. I'll try to put in a fix tonight if I get a chance.

gillibrand commented 11 years ago

I made a quick fix. It doesn't handle acronyms properly though. They just get title cased like other words now. I'll look into a better solution sometime soon. You'll need to re-download from the new link. I'm not sure if there's a better in-place updater in Alfred or not.

gillibrand commented 11 years ago

Added support for some common abbreviations during title case. Could use a more complete list and better testing, but pretty decent for my uses now.