-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
name initials in all caps string gets incorrectly lower cased #5
Comments
@ap would you be interested/willing to look into this? Thanks! |
Yes, I’ve meant to reply for a while. Sorry you’re having to wait. Uhm, what is your expected output here? “A.b” or “A.B”? Can you provide a non-gibberish example sentence that illustrates the case? |
A.B
Oh, no, my example is not gibberish :-) Anyway, how about this? Input: |
I guess that helps, insofar as it tells me that a simple example doesn’t make it obvious what’s going on linguistically. This “A.P” with a missing trailing period is not something I have ever seen or would normally write. How does it chunk? Is one person called “Michael” and the other “John A. P”? Are they “Michael A. P.” and “John A. P.”? Is “A.P” some kind of oddball nonstandard personal style (kinda like the people who insist their names be written in lowercase)? |
Thanks! I don't so much have control on the input text (often received from external sources). That being said, the way I saw the input above as - one person is called "Michael" and the other "John A.P" but I agree with you that there are other ways to look at it. Just to make sure this isn't really a corner case, I tried the following online titlecase conversions and they all seem to match the desired output:
Hmm ... I guess I didn't run into such a case with my input names at the least (about 10K names and counting) - who knows what could be next? :-) |
This one doesn’t implement Gruber’s rules at all. This one, when given all-caps input, preserves most words in all-uppercase, and when given all-lowercase input, matches the “a.p” output of this code. This one, when switched to NY Times rules, matches the “a.p” output of this code. The same is true for John Gruber’s latest published version (from 2015 as of this writing). I’m inclined to reject this one… However: if John himself agrees with the suggestion, then I will accept it with no questions asked. So you can try pinging him about it, or wait until I get around to it. (I want to ask him whether he has made any further changes to his code in the 9 years since, anyway.) |
Does NOT work:
Thanks!
The text was updated successfully, but these errors were encountered: