Questions tagged [syntax-highlighting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
0answers
111 views

Broken italics in code block

The answer here https://unix.stackexchange.com/a/472384/170373 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,...
4
votes
1answer
46 views

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 ...
5
votes
1answer
58 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 ...
-1
votes
1answer
54 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
45 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
34 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
33 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
51 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
71 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)...