Missing some word separators
-
Hello,
I have encountered an issue with Tooltipy’s keyword detection when a word is preceded by the typographic apostrophe ’ (/U+2019 = right single quotation that wptexturize puts everywhere).
WordPress automatically applies the wptexturize filter, which replaces the normal ASCII apostrophe (the straight quote) with the typographic apostrophe in post content. Because of this transformation, a phrase like “l’ego” does not trigger the tooltip for the keyword “ego”. The tooltip only works when the straight apostrophe is used, but this character is not present anymore once wptexturize has processed the content .
After checking the plugin code, it appears that Tooltipy’s internal list of word separators includes the straight apostrophe, but not the typographic one. As a result, Tooltipy does not recognize the typographic apostrophe as a valid word boundary, so the keyword that comes after it is never matched.
I guess that it affects French websites especially (since we use apostrophe everywhere), but not only.
I would like to suggest adding the typographic apostrophe as well as all the weird punctuation chars that are introduced by wptexturize.
https://developer.ww.wp.xz.cn/reference/functions/wptexturize/
Thank you for your help and for maintaining this very useful plugin.
PS: even in here I can’t force a neutral single quote to be rendered:
‘ should not be ‘ nor ’
In code blocks the text is not altered by wptexturize (thankfully):
' should not be ‘ nor ’
The topic ‘Missing some word separators’ is closed to new replies.