

Go to the list of existing issues in highlight.js GitHub repository and check to see if your request is already filed there, and if not, post it there. How do I report a bug or request a new language? Reporting a bug or requesting a feature for a language supported on Stack Exchange The same highlighting language that is used on a question is also used on its answers. If none of the tags have one, no syntax highlighting will be performed. If there's more than one tag that has a highlighting language specified, it lets highlight.js infer what's the best language to use. Check that the tags on a question have an associated language codesīy default, Stack Exchange uses the tags on a question to determine the language you are using. (Only moderators can change the highlighting language for a tag.) 3.

If the tag doesn't have a highlighting language specified when it should, create a feature-request on your site's per-site meta to request it. The language code that is currently being used for the tag (if any) will be displayed at the very bottom, below the wiki buttons: Visit the tag's wiki page to see it: click on the tag you've found at step 2 (such as javascript), then click " Learn more.". Check that the tag has a language code associated with itĮach tag may have a highlighting language specified in its properties. If your language is not on the list, follow the instructions in How do I report a bug or request a new language? section below. See Language codes currently available on Stack Exchange section below. Check that the language is supported on Stack Exchange See How do I use syntax highlighting? section below for more info. In case of a tag name make sure to also specify it in lower case. Make sure you're specifying a language code or the tag exists on a site If syntax highlighting is not enabled on a site, follow the instructions at the bottom of the answer there. Check that the site you're using has syntax highlighting enabled Why isn't my code being highlighted correctly? 1. Therefore, any bugs and feature requests regarding syntax highlighting cannot be handled by Stack Exchange.

It uses highlight.js, and may not necessarily be using the latest release of that library. Stack Exchange does not have its own syntax highlighting engine. When creating or editing posts, syntax highlighting is assigned to the preview based on question's tags as soon as you stop typing for 5 seconds. Syntax highlighting allows code in posts to be highlighted based on the language it's written in, to make it easier to read.
