Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [syntax-highlighting]

For questions about the syntax highlighting performed inside code blocks on Stack Exchange sites.

5
votes
1answer
52 views

Formatted C++ code is outdated for current standard

I don't know how it was decided which language to use when coloring the code blocks, but (on the main site) I assume it figured out it was C++ since it generally works OK. But, this line broke it. It ...
2
votes
1answer
36 views

Incorrect automatic Perl regex syntax

Becoming a Perl bandit, in this question I had to escape my regex expression \: to avoid funny syntaxing. Now on my newest Perl question, I encounter the same issue....
3
votes
1answer
44 views

Syntax highliting for Angular2+ questions

When looking at this question, I noticed that the syntax highlighting wasn't that great, most likely due to the mix of one block with HTML and Angular2 and blocks with TypeScript. I decided to ...
6
votes
1answer
50 views

Can't get the syntax highlighting for Go

The syntax highlighting (for Go) does not seem to be applied for this question: db access wrapper for Go project I tried to apply it manually to my answer (https://codereview.stackexchange.com/a/...
2
votes
1answer
73 views

python-3.x tag does not pass lang-py to code-prettify

I asked a Python 3 question, and tagged it python-3.x. The highlighting was messed up, because the python-3.x tag wasn't passing the lang-py argument to the JS ...
7
votes
2answers
79 views

How to properly display Matlab code?

When I try to post Matlab code, there are some formatting problems. For example, an apostrophe is used in Matlab to transpose a matrix. But when this is posted, it is interpreted as the beginning of ...
8
votes
0answers
56 views

Meta code highlighting

It appears that we don't have code highlighting in Meta In this answer to Your vote matters! the <!-- language: lang-sql --> was added to a block of SQL code,...
4
votes
1answer
203 views

VBScript Code Highlighting

Would it be possible to use the same Syntax Highlighter that Wikipedia uses for VBScript If it is possible we could probably use it for all flavors of VB (vb6,vbscript, vba, etc.) Right now we have ...
6
votes
2answers
240 views

Default code-prettify highlighting for C# is incorrect

Recently I had quite a few edits to include the correct syntax-highlighting for C# questions: <!-- language: lang-csharp --> That's needless editing for a ...
2
votes
1answer
37 views

PowerShell syntax highlighting bug with backticks

Refer to PowerShell Active Directory Browser Backticks are incorrectly interpreted as some sort of string, instead of a line continuation character.
3
votes
1answer
31 views

Automatic syntax highlighting doesn't work for Lua

According to this meta question, tag-based syntax highlighting should be working but In this Lua question that was not the case. I suggested an edit to fix the highlighting in the question itself but ...
7
votes
1answer
109 views

Could syntax highlighting be improved?

I noticed the syntax highlighting on CR was different than that on SO: Stack Overflow Syntax highlighting isn't perfect - the blue and the red could be a little brighter, but overall it's fairly ...
3
votes
1answer
53 views

CSS hex color bug

When you see a question in Code Review with some CSS and hex color codes in it, it appears like a comment. I think the syntax highlighter thinks that CSS uses python style comments i.e. ...
3
votes
1answer
71 views

How do you highlight code in a <pre> block?

Is there a way to highlight code syntax in a <pre> block? In this post, I had originally inserted my code using a ...
5
votes
1answer
81 views

Lisp symbols not highlighted correctly

Exhibit A: The symbol d_n+1 is highlighted as the variable d_n, operator+, and 1. This is incorrect; the symbol should be all ...
5
votes
1answer
147 views

Tag based syntax highlighting not working on all tags

If you look at this question, you'll see that it's wrongly highlighted and the poster had to add 's in comments, so the whole code didn't show up as a big string. ...
18
votes
2answers
184 views

Turning on syntax highlighting

On this particular site, I think it is absolutely critical to have syntax highlighting work, automatically if possible.