2

Possible Duplicate:
Changes to syntax highlighting

Some languages are not managed by the coloration system, such as nvelocity.

What is the technology used by Stack Overflow for syntax highlighting, and what are the languages which are detected?

2
  • Spell checking? Did I miss something? Commented Oct 25, 2011 at 14:00
  • 2
    @Asylum - no. Stack Exchange doesn't do spell checking. Your browser probably does though.
    – ChrisF Mod
    Commented Oct 25, 2011 at 14:44

2 Answers 2

5

As reported in Changes to syntax highlighting, syntax highlighting is done with Google Code Prettify, and the known language IDs are the following ones: apollo, bsh, c, cc, cpp, cs, csh, css, cyc, cv, go, hs, htm, html, java, js, lisp, lua, m, ml, mxml, perl, pl, pm, proto, py, rb, scala, sh, sql, vb, vhdl, wiki, yaml, xhtml, xml, xsl.

The syntax highlighting applied is the one associated to the tags being used (moderators can associate a syntax highlighting to every tag), the default syntax highlighting that is set by Stack Exchange employers for each individual SE site (the default one used on Stack Overflow is probably different from the one used on Drupal Answers), or the one that is set using an HTML comment similar to the following one:

<!-- language: lang-c -->
1
  • <!-- language: lang-yaml --> does nothing.
    – CommaToast
    Commented Jul 22, 2013 at 3:38
2

Stack Exchange uses Google Code Prettify. See the Syntax Highlighting section of the editing help page for more info.

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