Syntax Highlighting

Syntax highlighting is provided by highlight.js.

Languages

The bundled highlight.js package provides the most commonly used programming languages. If you need an additional language these can be added by adding additional language scripts to the ec_markdown/highlight asset bundle.

You can also provide your own replacement library by overriding the ec_markdown/highlight bundle. If you are replacing highlight.js you will also need to replace the ec_markdown/highlight_init javascript asset with your own initialization code.

Default Languages

  • Apache
  • CSS
  • HTTP
  • JavaScript
  • Objective C
  • Ruby
  • Bash
  • CoffeeScript
  • Ini
  • Makefile
  • PHP
  • SQL
  • C#
  • Diff
  • JSON
  • Markdown
  • Perl
  • C++
  • HTML
  • XML
  • Java
  • Nginx
  • Python