Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Syntax Highlighting

Thiago 'Jedi' Abreu edited this page Aug 22, 2015 · 2 revisions

Pretzel render code block with the HTML 5 convention: with <pre><code>.

Supported syntaxes

  1. Liquid (like in Jekyll)
{% highlight ruby %}
def foo
  puts 'foo'
end
{% endhighlight %}
  1. Markdown fenced block

With triple tick:

``` js
var foo = bar();
```

Or triple tilde:

~~~ js
var foo = bar();
~~~
  1. Markdown indented block

With four spaces:

    var foo = bar();

Highlighter

By default Pretzel use highlight.js but any highlighter supporting the <pre><code> html tag can be used (like Prism): you just have to replace the highlight.js css and js files by the chosen highlighter.