Skip to main content
4 of 5
added 73 characters in body
dessert
  • 40.7k
  • 17
  • 36

Syntax highlighting doesn’t work on meta

When I enter

<!-- language-all: lang-bash -->

    if :; then echo "quoted"; fi

in a post on main, the output looks like this:

example for proper syntax highlighting on main

Here on meta, the very same code gets no syntax highlighting at all:

if :; then echo "quoted"; fi

I already tried every possible combination from language: bash to said language-all: lang-bash without any avail. As the last paragraphs in this post by Eliah Kagan shows, I’m not the only one who is bothered by this – I think we all agree syntax highlighting is very useful.

Could you shed some light on whether that’s actually a bug or rather ?
If it’s the latter:

  • What are the precise reasons this decision was made?
  • Can we have a discussion on that?

When is syntax highlighting needed in meta? The only case I can think of is a question asking about syntax highlighting. Is that really a common enough issue to need it?

There are a number of scripts and code snippets posted here on meta, examples in addition to the above linked ones include:

Is there any good reason not to have syntax highlighting available?

dessert
  • 40.7k
  • 17
  • 36