From 7b52fb492ec003efbc0663fc5f8549bc4c6209b8 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Mon, 1 Aug 2011 17:35:33 -0400 Subject: [PATCH] added yml alias for yaml code highlighting --- plugins/code_block.rb | 1 + plugins/include_code.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/code_block.rb b/plugins/code_block.rb index 8670828..ff242aa 100644 --- a/plugins/code_block.rb +++ b/plugins/code_block.rb @@ -79,6 +79,7 @@ module Jekyll if @filetype @filetype = 'objc' if @filetype == 'm' @filetype = 'perl' if @filetype == 'pl' + @filetype = 'yaml' if @filetype == 'yml' source += " #{highlight(code, @filetype)}" else source += "
" + code.lstrip.rstrip.gsub(/
" diff --git a/plugins/include_code.rb b/plugins/include_code.rb index f2b8e37..e064fe2 100644 --- a/plugins/include_code.rb +++ b/plugins/include_code.rb @@ -55,6 +55,7 @@ module Jekyll @filetype = file.extname.sub('.','') @filetype = 'objc' if @filetype == 'm' @filetype = 'perl' if @filetype == 'pl' + @filetype = 'yaml' if @filetype == 'yml' title = @title ? "#{@title} (#{file.basename})" : file.basename url = "#{context.registers[:site].config['url']}/#{code_dir}/#{@file}" source = "
#{title} download
\n"