Can I visually indicate nbsp (\u00a0) characters?

Hi,

Our users are editing markdown with codemirror 4.3, and some (particularly French speakers) are carefully entering a unicode \u00a0 character in places where they’d like a non-breaking space.

A unicode nbsp looks just like a space (\u0020), so I was hoping to visually mark the nsbp characters in some way so they’re identifiable.

The specialChars option sounded like it might do the trick, so I tried adding \u00a0 to the default value:

/[\u0000-\u0019\u00a0\u00ad\u200b-\u200f\u2028\u2029\ufeff]/

However, this hangs my browser. Changing the \u00a0 to \u00a1 works as expected, so it seems to be an issue specific to \u00a0.

\u00a0 obviously has some special meaning to a browser, but it’s also a valid character in our documents. Is there any way to make it visible?

Ah, looks like this was covered in a github issue.

Upgrading to 5.1 or better resolves the issue for me - apologies for the noise.