Similar to my query about Visual C++, regex should default to lang-regex
instead of lang-default
.
1 Answer
Lucas got this right in the comments:
And IMO defaulting to no language for the regex tag is better, because regexes are most often used with a programming language, and that language should be the default (a single regex tag is often indicative of a poor question).
Since Regex questions are so often tagged with other languages as well, it doesn't make sense to set an explicit language identifier on that tag. Doing so will cause all code in the question to revert to default whenever there is another tag that has a language hint specified, which is quite often. So setting it on that tag would be very detrimental to the overall effects of the syntax highlighter.
[regex] = lang-regex
then; so someone has actually decidedlang-default
was better for regex!lang-regex
does seem to just highlight everything in a single color for regexes. I couldn't find it in the prettify lib either. I'm not so sure it's supported, despite what the FAQ says... I uselang-none
myself.