I provided an answer to a question tagged kotlin
and javafx
. The code blocks in my answer were predominantly in Java.
Without any language tags on the code blocks, the syntax highlighting for the Java code looked as though it were attempting to highlight kotlin code. I tried to remedy this with various combinations of
<!-- language: lang-java --->
// Java code here
or
```lang-java
// Java code here
```
or with
<!-- language-all: lang-java -->
at the top of the post.
These resulted in the code being formatted with no syntax highlighting, or with kotlin highlighting.
Is this a bug, or am I doing something wrong in trying to override the language used for syntax highlighting?
language-java
class. But there isn't any syntax highlighting, on the other hand. Seems like a bug.<!-- language-all: lang-java -->
at the top of your post and it helped a very tiny little bit there is some syntax highlighting in the preview but only in the first code block. The rest are still not styled.lang-scss
to make that syntax highlighting. Which is... not optimal (or correct). (Other inferred types arelang-coffeescript
andlang-delphi
without the language-all)