On 05/26/2014 10:49 AM, Steve Hall wrote:
 >
> My fix is similar, adding line 136 to the end of the words lowercased
> series:
>
>      let @x = substitute(@x, "'S", "'s", 'g')
>

Although the simplicity of that fix is great, I didn't do it that way 
because it doesn't handle quotes correctly. For example, it would 
un-capitalize the first word inside single quotes if it began with S:
THE 'SECOND' TITLE --> The 'second' Title
when what I want would be
The 'Second' Title

Therefore, my regex must find a "word" character before the 
quote/apostrophe, and also the S must be at the end of the word. I also 
assert that it must be a case-sensitive match, although that's probably 
unnecessary.

On a side note...unless I'm missing something, the entire "optional 
lowercase" section is in the wrong place in the script. Of course since 
it's commented out it doesn't matter...until you try to use it. I think 
it should come before the "fix first word again" line; otherwise 
optionally lowercased words are not re-capitalized when they appear 
first or last in the selection.

Maybe few people have used this functionality very much. My job of late 
has required processing a bunch of old data into HTML to make it 
available on our website. After the modifications mentioned above, your 
script has proven extremely helpful.

Best regards
Adam

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
cream-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cream-general

Reply via email to