Skip to main content

All 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 ...
Tripple Moon's user avatar
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) ...
Toothpick Anemone's user avatar
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) ** ...
BinChen's user avatar
  • 119
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 ...
Erwin Brandstetter's user avatar
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 ...
hkotsubo's user avatar
  • 2,313
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 ...
Flux's user avatar
  • 749
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 ...
Code Novice's user avatar
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 ...
Josh Goebel's user avatar
  • 1,609
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 ...
pygeek's user avatar
  • 271
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.
shirleyquirk's user avatar
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 ...
pygeek's user avatar
  • 271
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 ...
Ty Mick's user avatar
  • 99
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 ...
kriegaex's user avatar
  • 571
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 ...
Ben Kelly's user avatar
  • 5,407
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 ...
Tomas's user avatar
  • 8,825

15 30 50 per page
1
2 3 4 5