Linked Questions
36 questions linked to/from Goodbye, Prettify. Hello highlight.js! Swapping out our Syntax Highlighter
163
votes
1
answer
6k
views
Highlight.js: For Real, Please [duplicate]
Background: SE currently uses the Google code-prettify library for syntax highlighting. The possibility of switching has been suggested in the past:
Why doesn't StackOverflow use Highlight.js ...
646
votes
291
answers
90k
views
Formatting Sandbox
Notes:
Answers will occasionally be moved to the Sandbox archive when there are too many of them. When using them to report bugs, keep an eye on the post.
You may also want to take a look at the ...
585
votes
55
answers
65k
views
We're switching to CommonMark
I’m Ham and I’m a developer on the Teams team here at Stack Overflow. Over the past few months, I’ve been heads down working on the way we turn Markdown into HTML when writing and editing posts across ...
68
votes
46
answers
4k
views
Magic wand time - what does your community need?
Continuing in my series of questions to you:
Last week, I heard some great origin stories. This week, I’d like to refocus a bit on what could be better (in your view). I’m very curious about whether ...
311
votes
10
answers
7k
views
Please revert the line-height change!
Just checking how many people feel similar. At least for me, the increased space between lines makes it a nightmare to read. My eyes lack guidance and just feel somehow lost with so much white space.
...
624
votes
1
answer
131k
views
What is syntax highlighting and how does it work?
I noticed that sometimes my code gets highlighted in different colors when rendered.
What is syntax highlighting?
How does it work?
Why isn't my code being highlighted correctly?
How do I report a ...
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 ...
49
votes
2
answers
4k
views
Google Code Prettify has been officially discontinued; it's time for SE to maintain their own highlighter
On April 21, 2020, Google announced that their Prettify syntax highlighter, that Stack Exchange uses, has been discontinued and is no longer being maintained. The repository has been marked read-only ...
37
votes
2
answers
2k
views
Improving syntax highlighting language auto-detection
highlight.js's current auto-detection is arguably poor, due in large part to the large number of available languages it has to pick from when not given a language hint.
I suggest that when the ...
25
votes
1
answer
7k
views
Why doesn't Stack Overflow use Highlight.js instead of Google-Code-Prettify? [duplicate]
You heard me. From what I see here, and unless I am looking at a completely wrong place, Google Code Prettify hasn't been updated in almost an year now. Has it been abandoned?
I have just heard about ...
132
votes
2
answers
3k
views
Julia syntax highlighting
Since the syntax highlighter is now highlight.js it would be great to finally get some syntax highlighting for Julia code on Stack Overflow and other sites that might need this tag. Julia is one of ...
17
votes
2
answers
890
views
Is it possible to have a code block that isn't highlighted? [duplicate]
There are some languages that get highlighted incorrectly. Is it possible to specify a code block that does not have any highlighting when it gets displayed?
Here is an small example of CSS that is ...
17
votes
2
answers
367
views
The "Code Language" selection on the tag wiki page isn't in sync with available and supported syntax highlighting options
Moderators can set the default syntax highlighter on tags by selecting a value from a drop-down list:
The community maintains a list of supported languages by inspecting the Highlight.js code file ...
52
votes
1
answer
2k
views
Switching to highlight.js for syntax highlighting
I'd like to offer our syntax highlighter library highlight.js for using on the Stack Exchange sites. I am perfectly aware that you already have one in place and there was a similar discussion a while ...
19
votes
1
answer
234
views
Could we include the Stack Exchange Highlight.js theme in the Highlight.js core package?
Once the final theme is agreed upon would Stack Exchange be open to submitting a PR to add the theme "officially" to the core project so smaller sites who enjoyed your theme could use it on ...
18
votes
1
answer
1k
views
google-code-prettify seems dead
The code formating engine used by SO (google-code-prettify) seems dead (lasts two commits have been made on sep 2013 & mar 2014). As stated on this post, each code-formatting request have to be ...
35
votes
1
answer
412
views
Syntax Highlighting FAQ List Updates
Update: I've gone ahead and updated the FAQ with the specified changes
I recently became aware of the fact that the full list of language identifiers for the syntax highlighter on SE is a bit... ...
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 ...
12
votes
1
answer
216
views
Syntax highlighting changes in the middle of a token; resolved in a later version of Highlight.js
The code in my answer over at Stack Overflow highlights very strangely:
I discovered this at Stack Overflow, but it affects just as much all other Stack Exchange sites with highlighting enabled (I ...
21
votes
1
answer
606
views
A Stack Exchange fork of Google Prettify
Please consider maintaining (y)our own fork of Prettify.
I just tried to add new keywords for Swift¹ but
they wanted me to sign a CLA with all kinds of personal information and
the project does ...
35
votes
1
answer
548
views
Can Stack Overflow please upgrade to a version of highlight.js that supports PowerShell syntax highlighting?
This question is not a duplicate of:
Enable a "lang-powershell" option for Prettify on Stack Overflow
Please add support for PowerShell syntax highlighting
They are from a time when Stack ...
5
votes
1
answer
906
views
Add syntax highlighting for the Makefile language
I want to post a question with a significant chunk of Makefile code, but the preview given from my code isn't very exciting, and it highlights seemingly random words here and there.
The seemingly-...
8
votes
1
answer
556
views
Create Verilog Syntax Highlighter
According to the question Enable Verilog syntax highlighting, it is clear how to enable the syntax for various languages. That is not what this question is about, nor is it a duplicate of that. ...
38
votes
0
answers
293
views
Please deploy Fortran syntax highlighting
Fortran is supported by highlight.js. There are several Fortran questions at Stack overflow every day.
Please enable Fortran syntax highlighting.
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 ...
19
votes
1
answer
180
views
When does SE update their google-code-prettify builds? [closed]
Developers in the Elixir community have been trying to get Syntax Highlighting support for the Elixir Language on Stack Overflow and other Stack Exchange websites since 2013:
We have gone through all ...
5
votes
1
answer
196
views
Why does "lang-bash" not highlight a list of commands and their output but adding the [bash] tag to a question does?
Why does <!-- language-all: lang-bash --> not highlight a list of commands and their output (like it used to) but adding the [bash] tag (instead) to a question does?
Example question: FQDN ...
7
votes
1
answer
195
views
Very low contrast syntax highlighting on mobile site
The syntax highlighting for mobile on Android Chrome seems to be using a different set of colours, which looks much worse on mobile browsers (true over multiple SE sites)
Here's a side by side ...
-13
votes
1
answer
100
views
Option to format and view C and C++ code with ClangFormat [closed]
I want an option to render blocks of code found in questions and answers, with ClangFormat, so I can read the C++ and C code in the style I deem appropriate.
1
vote
1
answer
69
views
Why are these 2 code tables rendered differently?
When rendered in dark mode, one table has golden borders, the other one has white+grey borders. Despite they are using the same markdown, only content is different.
Please explain why.
My question is ...
6
votes
1
answer
84
views
Expose syntaxes associated with tags on data.stackexchange
Syntax highlighting is currently inferred from the question's tags. However, the links between tags and their syntax is seemingly arbitrary, with some languages having no association.
While I know ...
10
votes
0
answers
106
views
Upgrade highlight.js library, due bad assembly code highlighting
When I edited a SO post, I noticed an error in highlighting assembly code sample.
Not only formatting is not applied when using assembly nor x84asm language identifiers, but it looks bad even if using ...
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.
2
votes
0
answers
91
views
Has there been a recent font change? [duplicate]
I just noticed that the font looks completely different in two places:
In code blocks and inline code.
In the editor (old and new).
Maybe it's just me but this font sort of looks "funny". ...
1
vote
0
answers
59
views
Enable Verilog syntax highlighting [duplicate]
Can someone enable syntax highlighting for verilog and system-verilog code in SO?
2
votes
0
answers
36
views
Fixing complex syntax highlighting of existing posts [duplicate]
I noticed when reading Goodbye, Prettify. Hello highlight.js! Swapping out our Syntax Highlighter that the syntax:
<!-- language: lang-foo -->
something in the Foo programming language
is ...