Questions tagged [syntax-highlighting]

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

Filter by
Sorted by
Tagged with
4 votes
0 answers
62 views

Using custom prettifying code inside a SO post

In my Stack Overflow activity, I'm mostly interested in HPC and parallel programming, notably with openmp and mpi. Both of them support c, c++ and fortran as targeted languages, so I have quite often ...
Gilles's user avatar
  • 9,374
30 votes
0 answers
614 views

Syntax Highlighting for Neo4j / Cypher questions

The cypher query language used in the neo4j database is getting more and more traction as it has been "standardised" into Open Cypher, an initiative by multiple graph database vendors. I think it ...
Lukas Eder's user avatar
  • 216k
6 votes
0 answers
104 views

Google-Apps-Script deserves proper syntax-highlighting [duplicate]

Currently, there's no syntax-highlighting-hint for google-apps-script, which leads to a sizable number of those posts being tagged javascript despite that not being all that useful: While it is ...
Deduplicator's user avatar
  • 45.3k
-1 votes
1 answer
72 views

We should be asked to choose a kind of syntax highlighting!

I see a lot of posts with "code blocks" that does not need to be syntax highlighted. e.g. stack traces. I am suggesting that we should add an option when you create a code block using the {} button. ...
Sweeper's user avatar
  • 238k
5 votes
0 answers
77 views

Add JavaScript default language hint to [mongo-shell] tag

My mongo-shell code examples are not syntax highlighted. It seems that syntax highlight language is identified by question tags. The MongoDB shell is built on a JavaScript execution engine (V8). ...
Steve Tarver's user avatar
  • 3,170
2 votes
0 answers
61 views

Syntax highlighting: default to JavaScript highlighting for questions tagged [javascript-automation] / [jxa]

JXA (JavaScript for Automation), as the name implies, is based on a single language, JavaScript, so it makes sense to apply JavaScript highlighting to code blocks by default. P.S.: Perhaps ...
mklement0's user avatar
  • 411k
9 votes
0 answers
582 views

Doesn't [d] after all that time deserve some color too?

d currently doesn't have any automatic syntax-highlighting. After a good five years, isn't it time to change that? Default-highlighting seems to work acceptably well. While we are at it, let's do ...
Deduplicator's user avatar
  • 45.3k
19 votes
0 answers
549 views

Add the JavaScript language hint to the `reactjs` and `react-jsx` tags

Since React is a JavaScript library, questions that are tagged reactjs or react-jsx should utilize JavaScript syntax highlighting by default. Even in cases where React is used in a non-browser ...
Michelle Tilley's user avatar
4 votes
0 answers
93 views

Can questions tagged with [yii2] have PHP's syntax highlighting?

Many askers set the yii2 tag without the php tag. Can questions with this tag also be automatically colorized with PHP's syntax highlighting?
user avatar
2 votes
1 answer
61 views

indicate a numerical value in the abstract

When I learned Pascal lo' these many years ago (circa 1980) it had a loopy sort of pseudo-parser description. I also learned Backus-Naur forms and adopted the convention using "<" and ">" to ...
IRTFM's user avatar
  • 262k
-4 votes
1 answer
66 views

why does gstreamer tag not cause c/c++ code highlight?

When a question is tagged gstreamer it should, by default, cause C/C++ code highlighting - better then no highlight which is harder to read. I know that gstreamer can be integrated via python / java ...
nayana's user avatar
  • 3,882
5 votes
0 answers
92 views

possible bug with code highlight

I just finished an answer https://stackoverflow.com/a/32405036, and found the highlighting is broken. This works ok: replace(src_path,'/','') src_path, But this causes weird things, where code is ...
Juan Carlos Oropeza's user avatar
-3 votes
1 answer
76 views

Single quotes inside double quotes are being coloured incorrectly for PHP

Here is a php string: ", ',', '.')" Coloured version of it looks like this on site: It doesn't understand, that quotes can be nested and splits it as if it were 3 separate strings. Here is ...
user4035's user avatar
  • 23.1k
10 votes
0 answers
158 views

Enable Scala syntax highlighting for the [scala.js] tag

Could you please enable lang-scala syntax highlighting on questions tagged with scala.js? Scala.js is technically a dialect of Scala, but they have exactly the same syntax. And, if you think that ...
sjrd's user avatar
  • 22k
12 votes
0 answers
80 views

How about some automatic syntax-highlighting on meta?

AFAICS, there's just one tag on meta which has a high incidence of code in a predictable language: data-explorer How about we add a highlighting-hint for that?
Deduplicator's user avatar
  • 45.3k
3 votes
1 answer
47 views

How to edit the inferred language for a tag?

Is it possible to add the inferred syntax highlighting language to a tag, and if so, how? This came to mind when writing an answer to a gulp-related question. I had to specify the language manually, ...
Edward Brey's user avatar
2 votes
0 answers
46 views

Syntax Highlighting Bug [duplicate]

For some reason the syntax highlighter is displaying results_t the color used for type names in the Python code in this answer. In Python the convention is to capitalize the first letter of such names,...
martineau's user avatar
  • 122k
12 votes
0 answers
280 views

C# code highlighting for "async" and "await" [duplicate]

Can we have code highlighting for async and await in C#? async and await was released with .NET Framework 4.5. Visual Studio 2012 introduces a simplified approach, async programming, that ...
Maximilian Ast's user avatar
3 votes
0 answers
52 views

Tag language hint association request for meteor

Per the introduction of tag specific hints to syntax highlighting, and how to add (or suggest) a tag language association for syntax highlighting. Can the default language for meteor be lang-js? It'...
KyleMit's user avatar
  • 34.7k
1 vote
0 answers
19 views

Syntax highlighting for trait keyword [duplicate]

I noticed when answering a PHP-releated question that the trait keyword isn’t highlighted by the syntax highlighter, whilst other keywords such as class, function, and interface are. Is it possible ...
Martin Bean's user avatar
  • 38.9k
9 votes
0 answers
167 views

Batch syntax highlighting

While analyzing questions and answers in batch I've noticed the difficulty of reading the code because it's just the plain black text on gray background. Similarly, bash (unix/linux equivalent of ...
UnknownOctopus's user avatar
7 votes
0 answers
95 views

Perl syntax colouring

I'm aware that Perl is (intentionally, just like English) particularly awkward to parse, and so its automatic syntax colouring can be very wrong But while I expect to see the colouring engine thrown ...
Borodin's user avatar
  • 127k
3 votes
1 answer
95 views

Let's assume that gradle code snippets are written in Groovy

Code snippets in gradle-tagged questions are most likely to be written in groovy, so I suggest to make groovy default code language for syntax highlighting in this case. Based on discussion related to ...
shabunc's user avatar
  • 24k
11 votes
1 answer
178 views

Syntax Errors in Code Renderer?

In this question about a syntactic impossibility in Java, I had to write a chunk of code that purposely contained a syntax error. After submitting the question, I was reasonably surprised because the ...
Clashsoft's user avatar
  • 11.7k
1 vote
0 answers
88 views

Overuse of code highlighting [duplicate]

What is the consensus on the usage of code highlighting in the questions? I myself add it quite generously when it highlights actual pieces of code (keywords, variable names) in the text. This time ...
Vladimir F Героям слава's user avatar
3 votes
1 answer
138 views

Syntax highlighting for Crystal

Crystal is a new programming language with Ruby inspired syntax. So until it's popular enough for a plugin for Google code prettify, I propose to associate the crystal-lang tag with lang-rb, which ...
Jonne Haß's user avatar
  • 4,827
2 votes
0 answers
64 views

Syntax highlighting not present in duplicate closing modal

Maybe this isn't a bug, but a design feature, but I noticed when voting to close a question today, as a duplicate of another question, that the syntax-highlighting normally present for the code ...
Daedalus's user avatar
  • 7,676
9 votes
1 answer
159 views

How to add (or suggest) a tag language association for syntax highlighting?

I looked at the xamarin and xamarin-forms tag wikis, and there does not appear to be an association with a language for syntax highlighting for either of these. It does make sense, since many ...
Mark Larter's user avatar
  • 2,363
15 votes
1 answer
654 views

Enable automatic syntax highlighting of PowerShell

Recently, PowerShell syntax highlighting has become available in SE posts. But one has to explicitly request that using <!-- language: lang-powershell --> It's not automatically used as with ...
Martin Prikryl's user avatar
9 votes
0 answers
300 views

Shouldn't [ruby-on-rails] have ruby highlighting?

ruby-on-rails (203K) currently has a highlighting-hint of default instead of lang-rb, as ruby (only 133K) itself has. Please change it to lang-rb too.
Deduplicator's user avatar
  • 45.3k
9 votes
1 answer
661 views

Can I force syntax highlighting for a certain language?

I notice that stackoverflow automatically adds syntax highlighting to code blocks. I hate this. It always applies the wrong language's highlighting to the wrong code. Example? The last question I've ...
Marco Prins's user avatar
  • 7,289
4 votes
0 answers
98 views

Syntax highlighting for "Java Card" code?

Normally when we post a piece of code that is written in Java in our question, adding the Java tag to the question activates syntax highlighting which makes it easier to read. I want to know if is ...
Ebrahim Ghasemi's user avatar
3 votes
1 answer
52 views

How to highlight patterns in the text of a question?

I just edited a question where the description says something like (not quoting to show the difference properly): If I want to find all the instances of, say, "th" in a number of files you do: I ...
fedorqui's user avatar
  • 283k
15 votes
0 answers
256 views

Can we add Ada syntax highlight?

Ada syntax uses ' notation for both character and attribute notation. Syntax highlighter tends to generalizing ' as beginning of a character or a string and the second one as end notation. lang-ada ...
Jossi's user avatar
  • 1,030
33 votes
1 answer
552 views

Default highlighting for pandas, scipy and numpy should be set to Python

Umm, that's about it - as the title says pandas, scipy and numpy should all have a default language of python until an editor comes along and addresses a missing python tag or otherwise (in very rare ...
Jon Clements's user avatar
2 votes
0 answers
99 views

Add syntax highlighting for [lotusscript]

I know, that I might be a "dinosaur" as coding in IBM Notes / Domino nowadays should mainly consist of XPages, JavaScript, Java, HTML5, etc. But there are still questions in stackoverflow for the ...
Tode's user avatar
  • 11.9k
66 votes
1 answer
1k views

Recognize Dart as programming language

I noticed questions tagged with Dart are not automatically pretty-printed. For example, Dart undefined is not a function when assigning final field. Explicitly telling the editor to use lang-dart ...
jww's user avatar
  • 100k
3 votes
0 answers
33 views

Please enable syntax-highlighting for [UnityScript] [duplicate]

unityscript is the scripting-language used in unity3d. Because it currently has no syntax-highlighting-hint, people are mis-tagging JavaScript, misusing stack-snippets or do other weird things to get ...
Deduplicator's user avatar
  • 45.3k
-1 votes
1 answer
263 views

Syntax highlighting works for XAML but not for C# code [duplicate]

In the answer https://stackoverflow.com/a/29020629/2383264, the syntax highlighting only works for the XAML code posted. I tried putting <!-- language: lang-c# --> before the first C# code ...
helb's user avatar
  • 7,727
-2 votes
1 answer
355 views

Syntax highlighting for code doesn't work [duplicate]

The syntax described here doesn't work for me. I used <!-- language: lang-xaml --> and <!-- language: lang-c# -->. Nothing works. Here's what I wrote as an answer to some question. XAML &...
Łukasz Rejman's user avatar
-4 votes
1 answer
127 views

Typo in Markdown help [closed]

On the editing help page, there's an example showing syntax highlighting with a specified language. For C# it specifies <!-- language: c# --> (you need to expand the section to see it), however ...
RobSiklos's user avatar
  • 8,630
98 votes
2 answers
2k views

MATLAB syntax highlighting?

From this question I understand that syntax highlighting on Stack Overflow is done using Google's prettify project, which does support MATLAB syntax. Despite this, the MATLAB information page ...
eigenchris's user avatar
  • 5,821
2 votes
0 answers
36 views

Make [unityscript] code samples use lang-js syntax highlighting [duplicate]

Would it be possible to automatically have questions tagged with unityscript have their code samples be syntax highlighted with <!-- language: lang-js -->? I see questions tagged with c# get ...
Chris McFarland's user avatar
7 votes
0 answers
66 views

No highlighting for [objective-c++]?

Even though it's less popular than any of the related languages c, c++ or objective-c, it still deserves proper highlighting. Could a mod please add a highlighting-hint lang-c to objective-c++?
Deduplicator's user avatar
  • 45.3k
6 votes
1 answer
297 views

C# Syntax Highlighting broken? [closed]

In my post here, the C# highlighting is incorrect: Randomly, the DXGI namespace isn't highlighted (maybe because all uppercase) bool and get are not recognized as keywords. set is recognized as a ...
Ray's user avatar
  • 8,519
0 votes
0 answers
69 views

How do I use code prettifying? [duplicate]

I have been to Help Center → Our Model and I am unable to figure out how to prettify the Java code snippets in my question. I get the Ctrl + K to correct the indenting. But exactly what do I add ...
Mick's user avatar
  • 661
-1 votes
1 answer
78 views

Issue with code format? [duplicate]

I edited some stackoverflow question to remove the "js-snippet" markup. But after the edit, the code highlighter did not "pick up", so the code was not highlighted, I had to add <!-- language: lang-...
user avatar
23 votes
0 answers
612 views

Apply Python syntax highlighting for [python-3.5]

The still-in-the-works Python 3.5 already has a tag on StackOverflow. Can someone make the python-3.5 tag trigger Python syntax highlighting? Note: tag info pages for similar tags python-2, python-2....
Samuel Lelièvre's user avatar
2 votes
0 answers
64 views

Syntax Highlighter not working

I've noticed since the recent update Stack Overflow has undergone the syntax highlighting tool seems to be slightly off. Property names seems to be highlighted as Classes: How to change the display ...
JsonStatham's user avatar
  • 9,980
5 votes
0 answers
92 views

Syntax highlighting has a slight bug for swift function labels

From this answer: The 2nd # marks the label as required and should not be treated as a comment. Code: func addLocation(#latitude : Double, #longitude : Double) { /*...*/ } addLocation(latitude: 125....
Robert's user avatar
  • 38k

1
3 4 5
6
7