Questions tagged [syntax-highlighting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
1answer
54 views

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 ...
0
votes
1answer
47 views

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....
2
votes
2answers
40 views

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/*...
3
votes
1answer
31 views

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 ...
6
votes
1answer
31 views

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 ...
6
votes
1answer
49 views

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 ...
6
votes
1answer
69 views

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)...