Browse code

added yml alias for yaml code highlighting

Brandon Mathis authored on 01/08/2011 at 21:35:33
Showing 2 changed files
... ...
@@ -79,6 +79,7 @@ module Jekyll
79 79
       if @filetype
80 80
         @filetype = 'objc' if @filetype == 'm'
81 81
         @filetype = 'perl' if @filetype == 'pl'
82
+        @filetype = 'yaml' if @filetype == 'yml'
82 83
         source += " #{highlight(code, @filetype)}</figure></div>"
83 84
       else
84 85
         source += "<pre><code>" + code.lstrip.rstrip.gsub(/</,'&lt;') + "</code></pre></figure></div>"
... ...
@@ -55,6 +55,7 @@ module Jekyll
55 55
         @filetype = file.extname.sub('.','')
56 56
         @filetype = 'objc' if @filetype == 'm'
57 57
         @filetype = 'perl' if @filetype == 'pl'
58
+        @filetype = 'yaml' if @filetype == 'yml'
58 59
         title = @title ? "#{@title} (#{file.basename})" : file.basename
59 60
         url = "#{context.registers[:site].config['url']}/#{code_dir}/#{@file}"
60 61
         source = "<div><figure role=code><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"