What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

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

1 Answer 1

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 .