Skip to main content

Questions tagged [syntax-highlighting]

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

104 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
75 votes
0 answers
1k views

Support x86asm as a highlighted language

I would like to see x86 asm (Intel syntax) supported as a highlighted language. It is already supported by highlight.js as x86asm, and there are more than 15,000 questions in the x86 tag alone and ...
BeeOnRope's user avatar
  • 64k
74 votes
0 answers
4k views

Dockerfile syntax highlighting?

From what I read here, and here; I expected there would be syntax highlighting for Dockerfile files. But I've tried it to apply highlighting to one answer of mine here, but it never shows. I've tried ...
yivi's user avatar
  • 46.1k
42 votes
0 answers
590 views

Please bring back the bluish syntax colouring

I always thought that beige syntax colouring was a Meta thing because Meta was a greyed out version of SO. Now the beige keywords are used on SO as well, making it look... somehow wrong. Would it be ...
GSerg's user avatar
  • 77.9k
38 votes
0 answers
619 views

The STL tag uses the wrong language for syntax highlighting

The stl tag lists C as the language used for code highlighting ("Code Language (used for syntax highlighting): lang-c" on the tag wiki page). This is the incorrect language, as it should be &...
1201ProgramAlarm's user avatar
35 votes
0 answers
496 views

Quick way to set syntax highlighting

It would be helpful to have a quick and easy language selector to specify the primary programming language used in a post. In theory, this should be unnecessary, because Stack Exchange has a ...
Edward Brey's user avatar
  • 41.4k
33 votes
0 answers
398 views

CSS comments without preceding space are not highlighted properly

See this CSS code block: hello people { i-am-sorry: i-could-not; /* I am a comment. I am highlighted properly */ find-a-title: with-a-pun;/* I am a comment. I am highlighted wrongly */ } For the ...
Oriol's user avatar
  • 285k
30 votes
0 answers
624 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
  • 219k
30 votes
0 answers
759 views

How to handle languages for which Stack Overflow's syntax highlighting is broken?

While tinkering with a Sass-related answer today, I realised that the Sass syntax highlighting is pretty broken. It doesn't even recognise comments properly. Here's an illustrative snippet: Now, I ...
Mark Amery's user avatar
  • 152k
23 votes
0 answers
637 views

Automatic syntax highlighting for Spark Python & R APIs (PySpark & SparkR)

Could we have the pyspark and sparkr tags triggering respectively lang-python and lang-r syntax highlighting? I know that this is currently the case e.g. with numpy (triggering lang-python), and there ...
desertnaut's user avatar
  • 59.9k
23 votes
0 answers
895 views

Syntax highlighting for Arduino (C/C++) code

There have already been several discussions on whether Arduino code is C or C++, and sometimes those tags get removed, which also removes the syntax highlighting. Maybe C++ style highlighting could ...
Danny_ds's user avatar
  • 11.4k
23 votes
0 answers
614 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
22 votes
0 answers
415 views

How can I change the syntax highlighter theme colors?

The recent change from Prettify to highlight.js lead to surprising changes in code rendering. Is there a simple way to customize the theme colors beyond the light/dark switch? highlight.js comes with ...
chqrlie's user avatar
  • 143k
20 votes
0 answers
433 views

Tag [svelte] should be syntax highlighted as lang-html

svelte is a web framework where components are expressed with HTML syntax. Here's an example of what Svelte code looks like from their website: <script> let count = 0; function ...
loops's user avatar
  • 5,395
19 votes
0 answers
299 views

Enable automatic and on-demand syntax highlighting for PowerShell (updated for highlight.js)

Note: After the discussion in the comments, a separate post was spun off from this one, linked to below. Note: This isn't a duplicate of earlier posts such as Enable a "lang-powershell" ...
mklement0's user avatar
  • 425k
19 votes
0 answers
228 views

Please make the font and color settings in the snippet editor match the result in the question's code block

I only noticed today that there is mismatch between the display in the StackSnippet editor: and the resulting HTML in the code block in the question: First of all, the color coding is different, and ...
Mr Lister's user avatar
  • 46.4k
19 votes
0 answers
554 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
18 votes
0 answers
172 views

Add support for F# syntax highlighting

Currently f# is not fully supported. F# on this site uses ML as Syntax Highlighting by default. F# is a descendant from ML, but still is a lot different. For example, simple Line Comments for F# code ...
David Raab's user avatar
  • 4,478
18 votes
0 answers
258 views

Include CMake syntax highlighting in Highlight.JS

This has been going on for a while now, but I was just motivated enough today to raise the issue. See an answer I wrote here for an example: https://stackoverflow.com/a/68039135/2137996 I see "...
Alex Reinking's user avatar
16 votes
0 answers
320 views

Syntax highlighting: Use "lang-bash" (or similar) as default language for tags [powershell] and [powershell-core] until PowerShell is fully supported

Note: There are related existing posts, but this one makes a concrete proposal that complements the feature-request post that asks for proper PowerShell syntax-highlighting support via highlight.js, ...
mklement0's user avatar
  • 425k
15 votes
0 answers
310 views

Enable XQuery syntax highlighting (Prettify lang-xq.js)

I recently tried to add <!-- language: lang-xq --> to properly syntax-highlight a snippet of XQuery code in a StackOverflow question: for $n in Movies//Movie//OtherTitles let $d := ($n/...
Charles Duffy's user avatar
15 votes
0 answers
257 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,050
15 votes
0 answers
135 views

Enable default code highlighting in [rust] tag questions

I've asked for this feature on meta before it had been split into meta-stackoverflow and meta-stackexchange, however for some reason it was ignored. I thought it would be helpful to repeat it again ...
Vladimir Matveev's user avatar
14 votes
0 answers
175 views

Will Stack Overflow consider supporting third-party highlight.js packages?

One of the nice features of highlight.js is its plugin framework which adds support for third-party programming languages that are not supported by the main highlight.js development team. With Stack ...
Brad's user avatar
  • 3,964
14 votes
0 answers
643 views

Could Vue.js questions be adjusted to highlight correctly?

Currently, the vue.js tag does not automatically apply any syntax highlighting. I have reviewed these 2 posts: Meta SE - What is syntax highlighting and how does it work? Meta SO - What is syntax ...
zero298's user avatar
  • 26.6k
14 votes
0 answers
481 views

Add syntax highlighting for [thymeleaf] tag

The thymeleaf tag needs HTML syntax highlighting applied by default. It's an HTML template engine. Right now all the questions and answers are unnecessarily difficult to read with no syntax ...
ZeroOne's user avatar
  • 3,131
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.5k
12 votes
0 answers
243 views

Wrong default syntax highlighting in some tags

I noticed that two of my favorite tags have the wrong syntax highlighting assigned to them: clojure has lang-lisp syntax highlighter instead of lang-clj; coffeescript has lang-default syntax ...
Leonid Beschastny's user avatar
11 votes
0 answers
331 views

Inline formatting no longer works with syntax highlighting

Sometimes I use HTML <pre><code>…</code></pre> instead of Markdown ```…``` / ␣␣␣␣… blocks for code blocks with inline text formatting. I have noticed recently that such inline ...
Jon Purdy's user avatar
  • 54.5k
11 votes
0 answers
139 views

Assign JavaScript highlighting to [office-js] tag

The office-js tag is used for questions addressing Office Web Add-in's JavaScript library. Since the sample code in these questions is universally JavaScript, it would be helpful to have the office-...
Marc LaFleur's user avatar
  • 32.8k
11 votes
0 answers
157 views

Rust syntax - lifetime highlighting

It shows up in any snippet with explicit lifetimes - it formats lifetimes as though they were string literals fn lifetimes<'a, 'b: 'a>(x: &'b &'a str) -> &'a str { *x } ...
Djzin's user avatar
  • 1,228
10 votes
0 answers
91 views

Set the default syntax highlighting of the GitLab-CI tag to YAML

Please set the default language for gitlab-ci to lang-yaml. The GitLab CI/CD pipeline configuration is described in a YAML file (for reference: https://docs.gitlab.com/ee/ci/yaml/). Here are several ...
riQQ's user avatar
  • 12k
10 votes
0 answers
129 views

Where should bug reports and feature requests about syntax highlighting be made, now that the Prettify repository is no longer accepting new issues?

In the FAQ on syntax highlighting, it states that Stack Overflow uses Google Prettify, an external syntax highlighter, and issues and requests with it should be reported to them since SE doesn't ...
gparyani's user avatar
  • 1,978
10 votes
0 answers
169 views

lang-swift syntax highlighting for [swiftui] and [swift5] tags

Certain tags, like swift and swift4, will automatically apply a “code language” (used for syntax highlighting) of lang-swift. But newer Swift tags, like swift4.1, swift4.2, swift5, swift5.1, or ...
Rob's user avatar
  • 433k
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
9 votes
0 answers
117 views

Use Python syntax highlighting for [micropython]

Can we add Python syntax highlighting for questions tagged micropython? Some random examples of questions when this would be helpful: Update screen every hour Why isn't my ILI9488 touchscreen working?...
Jonas's user avatar
  • 127k
9 votes
0 answers
279 views

Request to set the TOML tag to default syntax highlighting to lang-ini

As per the guidance in What is syntax highlighting and how does it work? If the tag doesn't have a highlighting language specified when it should, create a feature-request on your site's per-site ...
Henry Ecker's user avatar
  • 35.4k
9 votes
0 answers
253 views

What's wrong with this CSS code so syntax highlighting seems to break?

As for the closing/re-opening: a) my question is about grid properties breaking the CSS rendering, not about CSS custom properties causing a comparable issue; b) the duplicate doesn't even have any ...
connexo's user avatar
  • 56.2k
9 votes
0 answers
385 views

TypeScript syntax highlighting seems broken in this question

I saw this question in my feed and noticed that despite the code being nominally correct, the syntax highlighting appears broken, starting at the generic type parameters to the arrow function. I copy/...
Jared Smith's user avatar
  • 21.4k
9 votes
0 answers
49 views

Add `lang-makefile` language hint to [makefile] tag

It seems like https://stackoverflow.com/tags/makefile/info is not associated with any "code language". It should use lang-makefile by default.
conny's user avatar
  • 10.1k
9 votes
0 answers
98 views

Activate [deno] syntax highlighting without having to tag [javascript] or [typescript]

deno is a secure runtime for JavaScript and TypeScript, however unlike nodejs it doesn't yet have syntax highlighting. Would it be possible to activate syntax highlighting for Deno without having to ...
kemicofa ghost's user avatar
9 votes
0 answers
162 views

Set highlighter for julia tag to lang-default?

I've noticed that there is no syntax highlighting on block code under the juliag tag in SO. Basically, how do we set a highlighter to be used by default with the julia tag? It seems like the default ...
Engineero's user avatar
  • 12.8k
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.5k
9 votes
0 answers
169 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
9 votes
0 answers
303 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.5k
8 votes
0 answers
62 views

Clarify "Syntax highlighting for code": specify where to put "language-all:" directive

On the page Markdown help, section Syntax highlighting for code needs to be clarified. Original text: To specify a syntax highlighting language to be used not only for the next, but for all following ...
Timur Shtatland's user avatar
8 votes
0 answers
62 views

Request to set Kubernetes tag default syntax highlighting to YAML

Please set the default language for kubernetes to lang-yaml. Kubernetes configuration is mostly written in YAML and applied via kubectl. While JSON is also possible to use, it's recommended to use ...
Dominik's user avatar
  • 2,431
8 votes
0 answers
255 views

Syntax Highlighting for ABAP

So far I made some posts about java, objective-c, etc. I always like to use the "code samples" block which marks text as code and provides syntax highlighting. Unfortunately this does not ...
Thorsten Niehues's user avatar
8 votes
0 answers
170 views

Please add a syntax highlighting hint to these tags

The following version specific tags should have syntax-highlighting enabled, like the also listed non-specific tag: kr-c c89 (c90 should be synonymized to it anyway) c11 Base tag is c, which already ...
Deduplicator's user avatar
  • 45.5k
7 votes
0 answers
94 views

Add support to Stack Overflow for highlighting Nim code

The Nim language (tag nim-lang) is supported in highlight.js, but it is not yet supported on Stack Overflow: hljs.registerLanguage('nim', ... is not present in the highlight.js loader. See the ...
pietroppeter's user avatar
  • 1,463
7 votes
0 answers
171 views

Set default syntax highlighting for [azure-sql-database] tag

The default syntax highlighting for azure-sql-database should be sql.
Edward Brey's user avatar
  • 41.4k