I just came across this old question and in Chrome with dark mode, it looks like this:
It happens when the language of the code block is set to lang-default
:
def a = "a string"
def b = 'another'
As you can see, the last character r
in the second line ... shows up white.
UI bug?
"= "<span class="hljs-symbol">'anothe</span>"r'
. It looks like this in light mode for me with my personal colour-style. So it's unrelated to dark/light mode. It's a highlight.js feature :Dr'
at the end as a raw string as groovy just uses the default highlighter (and indeed groovy is not officially supported)lang-default
should not exist (it's a SE invention). :-) There is always a very good chance it is going to result in poor behavior (and doubly so the way it's currently implemented). Since it does exist the best thing to do it avoid it. Rely on tag hints or manual language hints instead and you'll get far better results. But as Nick points out Groovy is tough since it's simply not supported/loaded by SE. The best thing would be for SE to find a similar grammar and alias that to groovy for consistent behavior.