You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
When accessing a reflected class object using .class, a string following it doesn't get highlighted as such.
Which language seems to have the issue?
java
Are you using highlight or highlightAuto?
highlight
Sample Code to Reproduce
For example, ImmutablePair.of(stuff, "bar") works fine, but ImmutablePair.of(Stuff.class, "bar") doesn't highlight "bar" as a string. There's a live repro using highlightjs 10.1.2 here: https://jsfiddle.net/chmxa1ze/
Expected behavior
The string should be highlighted as such.
Additional context
This may be related to #2428 and/or its fix.
The text was updated successfully, but these errors were encountered:
joshgoebel
changed the title
(java) Using .class breaks string highlighting
(parser) continueScanAtSamePosition can break highlighting if no other matches are found
Aug 9, 2020
Not sure if "you" meant me above, but if so I'm the wrong person to ask. :) I only have surface knowledge of language definitions, and no idea at all about the engine itself.
@joshgoebel I don't think this is quite fixed yet. The specific repro I posted above is now working, but this one is broken: https://jsfiddle.net/zxbtunvy/1/ Could you please have one more go at it? Thanks!
Describe the issue
When accessing a reflected class object using
.class
, a string following it doesn't get highlighted as such.Which language seems to have the issue?
java
Are you using
highlight
orhighlightAuto
?highlight
Sample Code to Reproduce
For example,
ImmutablePair.of(stuff, "bar")
works fine, butImmutablePair.of(Stuff.class, "bar")
doesn't highlight"bar"
as a string. There's a live repro using highlightjs 10.1.2 here: https://jsfiddle.net/chmxa1ze/Expected behavior
The string should be highlighted as such.
Additional context
This may be related to #2428 and/or its fix.
The text was updated successfully, but these errors were encountered: