6

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, the parts between asterisks are presented in italics, like so:

enter image description here

The question has tags text-processing, awk, sed, grep, perl. I don't think any of those language would warrant asterisks within a single-quoted string to be presented in italics.

In chat, it was noticed that all three code blocks in the answer get different CSS tags: "markdown", "dart", and "perl".

enter image description here

An annoying thing about this issue is that if the answer is opened for editing, the italics don't appear. They only seem to appear in the edit view, if you happen to modify the code block itself and wait a moment for the syntax highlighter to work.

4
  • I marked them all as being sh for syntax highlighting, I think that fixed it.
    – muru
    Jan 15 at 5:01
  • To increase the chances of action being taken: noting that all this seems to be "by design" (based on this and the way languages are inferred from tags) which part of the issue can we single out as buggy behavior? The highlighter autodetection feature? The way languages are inferred from tags? Code in talics, regardless of how effectively languages are guessed? Something else?
    – fra-san
    Jan 15 at 22:45
  • 1
    @fra-san, for one, that question has two tags that have a language setting (awk and perl). Either would be fine as a highlighting syntax for the answer, but it uses neither. Second, the fallback it uses (if it's a fallback) is completely useless on this site, the same way treating /* */ as comments by default is (or was. if it's changed now, that is.) Could be that having two conflicting tags is exactly what causes it, but that's effin idiotic behaviour.
    – ilkkachu
    Jan 15 at 23:38
  • 1
    Just stopping by to let y'all know that this was seen, and looks like marking the section with <!-- language-all: sh --> fixed it here. If you think that there is a more pervasive issue here, please post about it on MSE.
    – Yaakov Ellis StaffMod
    Feb 9 at 14:46

You must log in to answer this question.

Browse other questions tagged .