Linked Questions

629 votes
1 answer
133k 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 ...
1 vote
1 answer
153 views

Problem with Code Formatting [duplicate]

Possible Duplicate: Manually specify language for syntax highlighting For some reason when I edit this question, and I select the relevant code portions, and hit the code formatting button, my ...
Adam Rackis's user avatar
  • 22.3k
377 votes
11 answers
58k views

Syntax highlighting language hints [duplicate]

Do you think it would be worthwhile to provide hints as to what language to use for the syntax highlighting? Sometimes I find the highlighting on SQL or VB.NET answers is more distracting than ...
Rowland Shaw's user avatar
  • 7,333
57 votes
23 answers
38k views

Changes to syntax highlighting

locked for the history - please post bugs and feature-requests separately. -Shog9 We're changing the way syntax highlighting is done on the Stack Exchange engine. As you probably know, we use ...
Jeff Atwood's user avatar
156 votes
1 answer
32k views

Interface options for specifying language prettify [duplicate]

I'm the maintainer for Google Code Prettify. Markup authors can specify the language for source code, but not markdown authors. Are the SO admins interested in a way of doing this? If so, might the ...
Mike Samuel's user avatar
  • 2,026
17 votes
2 answers
16k views

Stack Overflow syntax highlighting [duplicate]

When using SO's code blocks, can you control how syntax highlighting is performed? Many times, I've pasted (for example) some shell output into an SO answer, and the syntax highlighting has been ...
Rodrigo Queiro's user avatar
6 votes
4 answers
358 views

<pre> versus four-space indentation?

I frequently make answers with code samples that are surrounded with pre tags instead of having each line indented with an extra four spaces, because doing the latter either means I have to add four ...
Delan Azabani's user avatar
4 votes
1 answer
7k views

How to insert code in stack overflow [duplicate]

Possible Duplicate: How do I format my code blocks? I did the following: I wrote my question, paste my code, then click {} from the format toolbar. My code turns to grey-colored, but is not ...
Jury A's user avatar
  • 151
2 votes
2 answers
2k views

Mark two languages in one code block

I have this question. I reformatted it, to get better view and syntax-highlighting. Referring to this and this, there is special markdown to force special highlighting. But that has one requirement: &...
Shegit Brahm's user avatar
7 votes
2 answers
543 views

Please add a "prettyprint" class when explicitly defined class with <!-- language: something -->

Please add a "prettyprint" CSS class when explicitly defining class with <!-- language: something --> regardless of there being no valid language tag. It is inspired by question Syntax ...
YOU's user avatar
  • 25.3k
4 votes
1 answer
1k views

List of languages for syntax highlight [duplicate]

When putting some code sections into SO questions, the system tries to detect the language and automagically colorizes the code but sometimes if the excerpt of code is small enough it cannot get the ...
Seki's user avatar
  • 496
5 votes
1 answer
419 views

Why do I get nice Erlang syntax coloring in preview but not in the rendered page after I post?

While I edit Erlang code there is nice syntax coloring shown in the preview. Once I post, the rendered code is often only black on grey. Example: Erlang pattern matching bitstrings Counterexample: ...
Peer Stritzinger's user avatar
31 votes
1 answer
253 views

Please provide a language pick-list for syntax highlighting

I saw on another question that mods have access to a nice pick-list for languages in certain scenarios (this one was about setting the default language for tags): I'd love to be able to use such a ...
Aaron Bertrand's user avatar
  • 43.5k
4 votes
1 answer
283 views

Can WPF tag highlight C# code?

Very often when questions are tagged as WPF, I find myself putting little snippets of C# into the answer (even if the question itself is specified in purely xaml, occasionally some C# makes a better ...
KDiTraglia's user avatar
5 votes
2 answers
388 views

Why is the syntax highlighting for this question's code all red?

I was reading this question, and the code is displaying all in red (the colour normally reserved for strings). I could perhaps understand no syntax highlighting (though the question is tagged Python),...
Cameron's user avatar
  • 509

15 30 50 per page