• Resolved iacobus1983

    (@iacobus1983)


    I’m cooperating to a website on which we use your plugin. Two points:

    1) As a matter of fact, a non-breaking space seems to be added whenever there’s marked-up text, like italics or bold. I’m not a technician, but: can it be that the < > signs in the markup are handled as if they were punctuation? Can you imagine a way to fix it – possibly without loosing our plugin customization?

    2) We happened to notice that if a word is followed by parenthesis, and the parenthesis is followed by punctuation, the plugin does not add a non-breaking space. For example, in a phrase like this:
    (bonjour) : et voilà
    Our webmaster has already fixed it by customising the regex within the installed plugin, but it’s good also you know it.

    Thanks in advance! (And, of course, thanks for the very helpful plugin)

    • This topic was modified 4 years, 1 month ago by iacobus1983.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author JS Morisset

    (@jsmoriss)

    1) As a matter of fact, a non-breaking space seems to be added whenever there’s marked-up text, like italics or bold. I’m not a technician, but: can it be that the < > signs in the markup are handled as if they were punctuation? Can you imagine a way to fix it – possibly without loosing our plugin customization?

    I’m not aware of that issue in the current plugin. Perhaps this is related to the customization you’ve done?

    2) We happened to notice that if a word is followed by parenthesis, and the parenthesis is followed by punctuation, the plugin does not add a non-breaking space. For example, in a phrase like this:
    (bonjour) : et voilà
    Our webmaster has already fixed it by customising the regex within the installed plugin, but it’s good also you know it.

    Thanks for your suggestion. If you have improvements to share, please do so and I’ll look at applying them in the next version.

    js.

    Thread Starter iacobus1983

    (@iacobus1983)

    Thank you for the quick reply.

    Indeed, the space added in text with markup is no nbsp entity, it’s a U+00A0 space, and it seems to be a quite current wordpress behavior: see for example https://github.com/WordPress/gutenberg/issues/13198

    So your plugin is definitely not involved.

    Greetings!

    Thread Starter iacobus1983

    (@iacobus1983)

    Hi again. Our developer kindly provided the regex as he modified it for us:

    Original: /(\w)( )([!\?:;%?]|?)/u
    Modified: /(\w|\w))( )([!\?:;%?]|?)/u

    The top one is “word followed by punctuation”; the new one is “word followed by punctuation or word followed by parenthesis followed by punctuation”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Strange behavior on marked-up text, plus another small bug’ is closed to new replies.