Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

For a post that is tagged with shell-script items () and not //, I was surprised when my answer to a question was shown mostly in grey (interpreted as a comment) when it hit the following in in my text: for i in a/*; ...

Please see Bash - Diff change header (name of files)

share|improve this question
I don't think bash highlighting is supported, in which case it probably guessed it was C++. – marcog Mar 27 '11 at 16:23
up vote 5 down vote accepted

Language inferencing is (mostly) based off of question tags. In this case, that question has two language hints ( and ), so we fall back to guessing.

Clearly, prettify is guessing incorrectly here.

There is a way to override this. Just slap <!-- language: bash --> before the code block as shown here.

share|improve this answer
it looks like 2 people already tried to edit my post to insert the language tag and it still looks as it it is handled as a "C" comment. – nhed Mar 27 '11 at 19:02
@nhed - the match is very exacting by design. I've edited the post to conform to the spec. – Kevin Montrose Mar 27 '11 at 19:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .