Page MenuHomePhabricator

[NWE + CodeMirror] Syntaxhighlighting and actual text out of sync for some special characters
Closed, ResolvedPublic1 Estimated Story Points

Description

Steps to reproduce:

  1. Edit in NWE with syntaxhighlighting enabled.
  2. Copy a word with a soft hyphen in it, I used "Kindergarten­stu­die" from https://de.wikipedia.org/w/index.php?title=Sebastian_Kurz&diff=prev&oldid=167161199.
  3. Insert it.

Note that CodeMirror shows red dots for the SHYs, which increases the length of the displayed syntax, while these characters are invisible in the actual text. The same might apply for other such characters as well.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 364736 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/CodeMirror@master] VE CodeMirror: Don't handle any specialChars

https://gerrit.wikimedia.org/r/364736

Change 364736 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] VE CodeMirror: Don't handle any specialChars

https://gerrit.wikimedia.org/r/364736

Deskana assigned this task to Esanders.
Deskana triaged this task as Medium priority.
Deskana set the point value for this task to 1.

Change 677502 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/CodeMirror@master] [DNM] Explore zero-width character bug

https://gerrit.wikimedia.org/r/677502

No action needs to be taken. We noticed that zero-width characters can be displayed by CodeMirror which is nice, but that the behavior is currently disabled to avoid misalignment. There is no user request or use case that would make us push for a fix here, just leaving as an observation.