All Questions
8 questions
3
votes
2
answers
190
views
Why does this code block have weird formatting?
COMMAND and OUTPUT is formatted as italics in this post. I know <pre><code> can be used to format text in code blocks, but that answer uses just a normal code fence ``` ```. Here's the ...
6
votes
0
answers
193
views
Syntax highlighting Java code in response to a Kotlin question
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 ...
3
votes
0
answers
92
views
Is there a comprehensive list of languages the code highlighter supports? [duplicate]
The triple backtick is my go to, to format snippets of code.
```
I regularly use them like:
```json for JSON
```py for Python
... and many more
Does a list of the linters Stack Overflow supports ...
2
votes
1
answer
76
views
Code snippet not getting highlighted [duplicate]
I have a piece of code after a list in a question. It is not getting syntax highlighted, even if I use SO code block, or indent it myself.
If I move it before the list, it works as expected. Also, ...
2
votes
0
answers
67
views
Escape backslash in code block [duplicate]
I just created this answer and am having a hard time escaping the backslash in order to keep the syntax highlighting consistent.
Normally I would just use double backslash, however in this instance ...
3
votes
0
answers
293
views
Is it possible to get more advanced Ecmascript syntax highlighting for code snippets?
I've done some searches and this doesn't appear to be an option as far as I can tell.
I know about <!-- language: lang-js --> and it works great, but it doesn't do a great job with some more ...
11
votes
1
answer
180
views
Syntax Errors in Code Renderer?
In this question about a syntactic impossibility in Java, I had to write a chunk of code that purposely contained a syntax error. After submitting the question, I was reasonably surprised because the ...
8
votes
2
answers
822
views
Can I force syntax highlighting for a certain language? [duplicate]
I notice that stackoverflow automatically adds syntax highlighting to code blocks. I hate this. It always applies the wrong language's highlighting to the wrong code.
Example? The last question I've ...