[Bug]: RegEx for breakText and textWrap opt.hyphen does not include international characters
holzmare opened this issue · comments
René Holzmann commented
What happened?
By default breakText and textWrap do not include chraracters from international alphabets leading to strange behaviour when wrapping words containing them. In my opinion the default should include those.
Suggested regex to match them:
/[^\w\dŽžÀ-ÿ]/
Version
3.7.5
What browsers are you seeing the problem on?
any browser
What operating system are you seeing the problem on?
any OS
Roman Bruckner commented
This might work better /[^\w\d\u00C0-\u1FFF\u2800-\uFFFD]/
(from StackOverflow answer).
The one you provided doesn't work for Czech ř
, for example.
Note, this should not be a blocker as you can provide a custom hyphen
to the textWrap
attribute.