diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-08-21 10:31:14 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-08-21 10:31:58 -0400 |
commit | 089af26b02dbdce0c960aa544bd8b803d69d4e5f (patch) | |
tree | 98d2a7686acdb603b710a18d2b04483357c8bfc5 /plugins/include_code.rb | |
parent | 83d87f98cc22dd00bc1ececcb3022ae9ccb964cb (diff) | |
download | my_new_personal_website-089af26b02dbdce0c960aa544bd8b803d69d4e5f.tar.xz my_new_personal_website-089af26b02dbdce0c960aa544bd8b803d69d4e5f.zip |
improved lang:language for codeblock and include code. It no longer strips out surrounding whitespace.
Diffstat (limited to 'plugins/include_code.rb')
-rw-r--r-- | plugins/include_code.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/include_code.rb b/plugins/include_code.rb index 046f6245..5529f322 100644 --- a/plugins/include_code.rb +++ b/plugins/include_code.rb @@ -30,9 +30,9 @@ module Jekyll def initialize(tag_name, markup, tokens) @title = nil @file = nil - if markup.strip =~ /\s+lang:(\w+)/i + if markup.strip =~ /\s*lang:(\w+)/i @filetype = $1 - markup = markup.strip.sub(/\s+lang:\w+\s*/i,'') + markup = markup.strip.sub(/lang:\w+/i,'') end if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i @title = $1 || nil |