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

The comments above and below jquery(document)... are rendered incorrectly. Here's a screenshot of the original page:

share|improve this question

2 Answers 2

up vote 3 down vote accepted

That question is tagged both and , so the prettifier doesn't know what to do and chooses some default colorization that doesn't work well here. See this question for more information.

You can add a magic comment to specify the language before a code block. (This didn't exist back when that particular answer was posted.) You need one such comment before each code block for which you want to select a different language for highlighting.

<!--language: lang-js-->

    jQuery.noConflict();
…

(I thought this was supposed to work with <!--language: javascript--> too, but it doesn't. Why?)

share|improve this answer

You can forcing the language that code block is interpreted as, see this post, which should fix this.

To force JavaScript, we can use <!-- language: lang-js --> before the code block.

That said, the example question is tagged already, so it should automatically be doing this, but maybe the other tags were getting in the way...

share|improve this answer

You must log in to answer this question.

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