Questions tagged [syntax-highlighting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7 votes
0 answers

Broken italics in code block

The answer here contains this code block: grep -vE '0.*1|1.*[02]|2.*[13]|3.*[24]|4.*[35]|5.*[46]|6.*[57]|7.*[68]|8.*[79]|9.*8' In that particular answer,...
  • 121k
6 votes
1 answer

Is there something wrong with tags determining the language for syntax highlighting?

Is it just me, or has the language detection from tags for syntax highlighting been broken lately? I seem to have noticed a couple of times that scripts containing /* were highlighted as if it that ...
  • 121k
6 votes
1 answer

Why aren't some codeblocks highlighted?

More often, I see some codeblocks like this c block or this bash block, which just aren't highlighted. Often simple constructs like for-loops etc are, indeed, highlighted. But it looks broken. And ...
  • 10.3k
6 votes
1 answer

How to switch on syntax highlighting for python snippet?

I tried to highlight some code in this answer, by inserting an explicit <!-- language-all: python --> at the top of the file. I also tried <!-- language: python --> just before the ...
  • 76.1k
6 votes
1 answer

Why prettify mistakes `/*` as comment for "shell script"

Specifically this question. Apparently it's interpreting /* as the beginning of a comment which it isn't in any shell I known of (only JS, Java and some C-like language to my limited knowledge do this)...
  • 34.4k
4 votes
1 answer

Improve syntax detection based on shebang

On a few occasion, I've seen code blocks such as: #! /bin/zsh - echo foo/* echo this is not part of a C comment. Being highlighted as C code even though the Q&A had a zsh tag and the shebang ...
3 votes
1 answer

False bash syntax highlighting: '$#' should not get identified as comment start

Let's look at a simple code example written in Bash: As you can see, the light grey comment highlighting in line 3 starts at the # symbol, although it's part of the reserved variable name $# and ...
2 votes
2 answers

Shell syntax highlighting does silly things like consider rmdir a comment

On the main site, this <!-- language: lang-shell --> # do these steps on each distro mv Documents Documents.old ln -s /shared/your-user/Documents Documents mv -i Documents.old/*...
  • 104k
-1 votes
1 answer

Suggestion to use 'bash' as syntax highlighting for text processing related tags

I recently came to know that we can use <!-- language-all: bash --> or <!-- language: bash --> for manually adding syntax highlighting. It is also mentioned in: https://unix....
  • 11.1k