-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Description
Describe the issue
JEP 361: Switch Expressions intruduces new keywords ´yield´ to Java in context of ´switch´ but ´yield´ is not rendered as such.
Which language seems to have the issue?
Java, language is set fixed.
Are you using highlight
or highlightAuto
?
I use hightlight via asciidoc reveal.js
Sample Code to Reproduce
switch(a) {
case Object -> yield 1;
}
Expected behavior
<span class="hljs-keyword">switch</span>(a) {
<span class="hljs-keyword">case</span> Object -> <span class="hljs-keyword">yield</span> <span class="hljs-number">1</span>;
}
Additional context
´yield´ is a contextual keyword, this means it can be a normal identifier in Java. It is a keyword within the switch expression, see JLS 3.9. Keywords