Closed neongreen closed 6 years ago
Good, thanks. You might consider submitting this upstream to KDE, since presumably it also affects rendering in the Kate editor.
It might also be worth improving the regex:
(\\'|\\[^']+|[^\\\n])
You probably need a \r
in the last character class, for Windows.
And what if the character is a control character (a literal tab or something like BEL)?
And what if the character is a control character (a literal tab or something like BEL)?
Yes, the regex doesn't take that into account. I think the right thing to do is to take the Haskell Report and just encode the definition from there, but I stared at it for two minutes and gave up :(
As for \r
, I'm not sure even the \n
is necessary there (I've no idea how stuff like #stay
works). It might be prudent to add \r
to the patched file in skylighting, yeah.
Highlighting for Haskell char literals treats them basically as strings, which breaks in presence of
-XDataKinds
:This PR fixes it by using a (somewhat crude) regex for chars instead of “everything between two apostrophes”.