Questions tagged [syntax-highlighting]
The syntax-highlighting tag has no usage guidance.
9
questions
6
votes
0
answers
112
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
1
answer
49
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
1
answer
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
1
answer
56
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
2
answers
46
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
1
answer
40
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
1
answer
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
1
answer
57
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
1
answer
73
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)...