All Questions
Tagged with code-formatting syntax-highlighting
67
questions
4
votes
1
answer
174
views
Syntax highlighting of Makefiles
The syntax highlighting is bugged for Makefiles.
As per https://meta.stackexchange.com/a/356459/1288919 I used:
```lang-makefile
Current output for: https://stackoverflow.com/a/77223358/22510042
...
7
votes
1
answer
133
views
Is the language name case sensitive for syntax highlighting?
I often use the syntax-highlighting feature of Stack Exchange in order to make my code easier to read.
```lang-python
for k in range(0, 10):
print(k)
```
for k in range(0, 10):
print(k)
...
0
votes
0
answers
120
views
Why is my Python code not highlighted? [duplicate]
I have posted the following code in my question:
import numpy as np
for i in range(3):
n = np.random.randint(2, 10000)
m = np.random.randint(1, n)
A = np.random.randn(m, n) * ((1 / m) ** ...
6
votes
1
answer
676
views
HTML formatting inside code blocks doesn't work if syntax highlighting is being performed for the block
I have plenty of old answers where I used <pre><code> to format code, with HTML tags such as <b> or <strike> inside such blocks.
That has been broken for some time now, on SO ...
4
votes
1
answer
183
views
Some lines of code block are bold when the question has at least two language tags
We've found this problem in this question on Stack Overflow in Portuguese, but I've also tested in other sites (English and Spanish SO's), and it happened there as well.
In the aforementioned ...
0
votes
0
answers
28
views
How to disable syntax highlighting in Markdown fenced code blocks [duplicate]
For indented code blocks, adding <!-- language: lang-none --> disables syntax highlighting. What about for fenced code blocks? Can I use lang-none or none in fenced code blocks too?
Which of the ...
4
votes
1
answer
814
views
Is it possible to copy formatted text from Stack Overflow posts/answers, i.e. colors, fonts, etc.?
I'm attempting to copy and then paste code examples from existing Stack Overflow posts into personal documentation which I often end up using Word to paste into. I find that I often am having to copy ...
91
votes
2
answers
2k
views
Stop guessing/auto-detecting a language when you KNOW it will be incorrect
The problem: SE asks Highlight.js to autodetect the language when it knows there isn’t any optimal/correct choice for us to make - resulting in very poor outcomes.
Disclaimer: I say this as the ...
6
votes
0
answers
189
views
Add syntax highlighting support for Dockerfiles
Highlight.js supports syntax highlighting Dockerfiles, but support is not present on Stack Exchange’s version of highlight.js. Please consider adding support for this.
Example question on Stack ...
4
votes
0
answers
163
views
Add syntax highlighting support for Nim
Highlight.js supports syntax highlighting for Nim here. Questions on Stack Overflow for [nim-lang] currently have no highlighting support, and this would be a valued feature for users.
11
votes
0
answers
1k
views
Add syntax highlighting support for nginxconf
Highlight.js supports syntax highlighting for nginx configuration files, but support is not present on Stack Exchange’s version of highlight.js. Please consider adding support for this.
Example ...
9
votes
0
answers
477
views
Syntax highlighting language request: Python REPL
Highlight.js treats Python REPL (the Python interpreter in interactive mode) as its own language separate from Python—it uses the class names python-repl and pycon. I checked Stack Exchange's ...
13
votes
1
answer
593
views
What happened to Groovy syntax highlighting?
On Stack Overflow I have answered many questions about Spock and Geb, two Groovy test frameworks. For years, I have used <!-- language: lang-groovy --> in combination with indentation by four ...
317
votes
38
answers
58k
views
Goodbye, Prettify. Hello highlight.js! Swapping out our Syntax Highlighter
Update 2020-09-24
This is now live network-wide.
Update
This is now live on Meta Stack Exchange and Meta Stack Overflow. Any bugs and feedback can be posted here as an answer.
I’m Ben and I’m a dev ...
7
votes
1
answer
1k
views
Why doesn't the syntax highlighting work?
I tried several ways of how to do syntax highlighting for R in this question, but it doesn't work. I tried ```R (see revision 3 of the question) and <!-- language: R --> (see revision 2) but ...