updated syntax highlighting support for perl and objective c in code_block and include_code plugins

This commit is contained in:
Brandon Mathis 2011-07-25 20:34:52 -04:00
parent d10ba20d14
commit 20764e31ee
3 changed files with 9 additions and 3 deletions

View file

@ -73,6 +73,8 @@ module Jekyll
source = "<div><figure role=code>"
source += @caption if @caption
if @filetype
@filetype = 'objc' if @filetype == 'm'
@filetype = 'perl' if @filetype == 'pl'
source += "{% highlight #{@filetype} %}\n" + code + "\n{% endhighlight %}</figure></div>"
else
source += "<pre><code>" + code.lstrip.rstrip.gsub(/</,'&lt;') + "</code></pre></figure></div>"