Quote:
Originally Posted by tempura
Hey, DiapDealer, again. I just noticed an odd behaviour on your plugin. I used it on a book which had a character named "Philonoë". So, when I actually use the plugin it produces "Philonoë‘s" instead of "Philonoë’s" i.e. the opening quote instead of the closing quote. Hope this can be fixed. Also, occurs with "Philonoë’d"
|
I see the problem--and I THINK I can fix it. Just have to do some testing to make sure the fix doesn't break something else.
Looking for the problem also illuminated a different issue that I'm not sure I can fix. The Smartypants algorithm does a lot of regex lookarounds to determine if a preceding (or following) character is (or isn't) a "word" character. It's not a problem with your example, but consider if your example used an entity instead of a unicode character:
I can fix it so "Philonoë'd" or "Philonoë's" is smartened correctly. But if you (or anyone) uses an entity instead of a character in that situation); like "Philonoë'd" or Philonoë's", then the regex being used has no (easy) way of determining if the preceding entity does (or doesn't) represent a word character.
Even if with the fix I have planned, the smartening algorithm would fail in that situation.
Thanks for pointing out the original issue!