diff options
Diffstat (limited to 'plugins/pygments_code.rb')
-rw-r--r-- | plugins/pygments_code.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/pygments_code.rb b/plugins/pygments_code.rb index 1930ec83..67ce8c34 100644 --- a/plugins/pygments_code.rb +++ b/plugins/pygments_code.rb @@ -7,6 +7,10 @@ FileUtils.mkdir_p(PYGMENTS_CACHE_DIR) module HighlightCode def highlight(str, lang) + lang = 'ruby' if lang == 'ru' + lang = 'objc' if lang == 'm' + lang = 'perl' if lang == 'pl' + lang = 'yaml' if lang == 'yml' str = pygments(str, lang).match(/<pre>(.+)<\/pre>/m)[1].to_s.gsub(/ *$/, '') #strip out divs <div class="highlight"> tableize_code(str, lang) end |