Invalid rendering in Java after .class element in function arguments
See original GitHub issueDescribe the issue
The var args attributes of Map.of(…) function containing a .class
are not properly rendered.
Which language seems to have the issue? Java language
Are you using highlight
or highlightAuto
?
I don’t know, I am using highlight.js with @asciidoc/reveal.js module
Sample Code to Reproduce
Map<String, Object> producerConfig = Map.of(
BOOTSTRAP_SERVERS_CONFIG, "localhost:9092",
ACKS_CONFIG, "1",
KEY_SERIALIZER_CLASS_CONFIG, IntegerSerializer.class,
VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class
);
Renders as
The problem seems to be related to the .class
element, replacing IntegerSerializer.class
by a String fixes the problem.
Expected behavior The last Map element should be rendered as the previous one.
Additional context
Highlight.js 9.18.3 in Chrome with Github Theme
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Wrong number of arguments error when invoking a method
I have class AClass and a method someMethod that gets an Object array as parameter. Object[] parameters; // lets say this object array...
Read more >java - Parameters are passed by value, but editing them will ...
When an objects is passed into a method as a parameter, it is also the reference that is copied, so the called method...
Read more >The Method Declaration
Java requires that a method declare the data type of the value that it returns. If a method does not return a value,...
Read more >Java Advanced Imaging: Class RenderedOp
This method performs the actions described by the documentation of createInstance() optionally marking the node as rendered according to the parameter.
Read more >SyntaxError: missing ) after argument list - JavaScript | MDN
There is an error with how a function is called. This might be a typo, a missing operator, or an unescaped string, for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you very much for your help and your quick answers.
I manage to upgrade for real 😉
The Highlight JS version used is not the one I thought. My bad, it is 9.18.1. https://jsfiddle.net/83dzw1ux/1/
This issue seems to be fixed in recent releases.