aboutsummaryrefslogtreecommitdiff
path: root/plugins/code_block.rb
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-07-25 20:34:52 -0400
committerBrandon Mathis <brandon@imathis.com>2011-07-25 20:35:24 -0400
commit20764e31eefcc077341a7dab649e37dcd361a8d0 (patch)
tree46c3cd9529d66b3b34fc7cbbeced0744b8f7d16a /plugins/code_block.rb
parentd10ba20d140ca0a4a0eda1900d66f6c76bbfa883 (diff)
downloadmy_new_personal_website-20764e31eefcc077341a7dab649e37dcd361a8d0.tar.xz
my_new_personal_website-20764e31eefcc077341a7dab649e37dcd361a8d0.zip
updated syntax highlighting support for perl and objective c in code_block and include_code plugins
Diffstat (limited to 'plugins/code_block.rb')
-rw-r--r--plugins/code_block.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/code_block.rb b/plugins/code_block.rb
index 4264d197..4cf2817b 100644
--- a/plugins/code_block.rb
+++ b/plugins/code_block.rb
@@ -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>"