- Issue created by @prudloff
- Status changed to Needs review
almost 2 years ago 12:12pm 2 May 2023 - 🇫🇷France prudloff Lille
For some reason,
preg_replace("/\s([»])/", ' $1', 'foo « bar »')
seems to also replace the«
character and I am not sure sure why. Because of this,preg_replace("/\s([\!\?\:;»])/", ' $1', $t)
wouldn't do what I wanted.
So I had to work around this by using a separatepreg_replace()
without[]
. - Merge request !4Issue #3357618: Add non-breaking space inside French quotes → (Open) created by prudloff
- last update
over 1 year ago 5 pass - First commit to issue fork.
- Status changed to Needs work
9 months ago 6:23am 8 May 2024 - 🇺🇸United States benjifisher Boston area
I don't know if it's OK, since it is an old unmaintained library?
Right, I prefer not to touch it unless it is doing something obviously wrong.
If we are going to change it, then we should add some tests to make sure that we are not getting some undesired behavior. Can you provide some test cases: strings before and after applying the
typogrify
filter? Better yet, could you add them to the data provider in the automated test?I am not sure that
spaceToNbsp()
is the right place to make this change. It does not match the purpose of that function, as described in its doc block.Looking at the code (but not testing) it seems that the change to
i18nQuotes()
will insert the non-breaking space in some cases that currently do not get any sort of space. That seems like an unwanted side effect.