Hello,
There is a problem with the visual editor when you add or modify a template with a custom format. Some parameters equal sign are no longer aligned.
It seems that visual editor when calculating the length of the names of the different parameters, it is the byte size that is used instead of the size number of characters.
See example on frwiki. The number of spaces after certain parameters is mistake reduced.
It seems to me that this bug did not exist in July 2019 (I had not contributed between July 2019 and February 2020), so it's probably a regression.
The problem appears to be from parameters names with multibytes characters.
Test :
The custom format used for this test was as follows: {{_\n | ___________ = _\n}}\n (diff)
The following test with the visual editor gives this: (see test diff)
{{Bac à sable | abc = 123 | abc abc = 123 | abc abc abc = 123 | abc ébc = 123 | abc ébé = 123 | abc €bc = 123 | abc €b€ = 123 }}
Instead of:
{{Bac à sable | abc = 123 | abc abc = 123 | abc abc abc = 123 | abc ébc = 123 | abc ébé = 123 | abc €bc = 123 | abc €b€ = 123 }}
In the example, the character é (two bytes) seems to count as two characters. And the character € (three bytes) count as three characters.
Character | Bytes |
---|---|
a, b, c | 1 |
é | 2 |
€ | 3 |
The problem is not present with TemplateWizard (diff).
Thank you.
Sorry for my bad English.