When I enter
<!-- language-all: lang-bash -->
if :; then echo "quoted"; fi
in a post on main, the output looks like this:
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 status-bydesign?
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:
- code copied from main for analysis: https://meta.askubuntu.com/a/15292/507051
that’s a case where syntax highlighting would be especially useful - SEDE SQL scripts: https://meta.askubuntu.com/a/13806/507051
- SVG code: https://meta.askubuntu.com/a/2631/507051 and https://meta.askubuntu.com/a/2640/507051
- scripts requested by OP: https://meta.askubuntu.com/a/13905/507051, https://meta.askubuntu.com/a/483/507051 and https://meta.askubuntu.com/a/294/507051
Is there any good reason not to have syntax highlighting available?