diff options
author | Brandon Mathis <brandon@imathis.com> | 2013-04-09 09:23:31 -0500 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2013-04-09 09:23:31 -0500 |
commit | afca876bd46f13002119c6a342ff75c4db28ac0b (patch) | |
tree | 0e6a98838fdd813f08878598c2155876ce9e6a9d /plugins | |
parent | 3ab22cb8209687f9a77b22c896e16c23a00f3845 (diff) | |
download | my_new_personal_website-afca876bd46f13002119c6a342ff75c4db28ac0b.tar.xz my_new_personal_website-afca876bd46f13002119c6a342ff75c4db28ac0b.zip |
Accepting all non-whitespace characters as language names for Pygments code highlighting
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/code_block.rb | 4 | ||||
-rw-r--r-- | plugins/include_code.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/code_block.rb b/plugins/code_block.rb index f2ae3e55..c70e181e 100644 --- a/plugins/code_block.rb +++ b/plugins/code_block.rb @@ -56,9 +56,9 @@ module Jekyll @caption = nil @filetype = nil @highlight = true - if markup =~ /\s*lang:([\w-]+)/i + if markup =~ /\s*lang:(\S+)/i @filetype = $1 - markup = markup.sub(/\s*lang:([\w-]+)/i,'') + markup = markup.sub(/\s*lang:(\S+)/i,'') end if markup =~ CaptionUrlTitle @file = $1 diff --git a/plugins/include_code.rb b/plugins/include_code.rb index 1ee3223f..220466b6 100644 --- a/plugins/include_code.rb +++ b/plugins/include_code.rb @@ -32,9 +32,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:(\S+)/i @filetype = $1 - markup = markup.strip.sub(/\s*lang:([\w-]+)/i,'') + markup = markup.strip.sub(/lang:\S+/i,'') end if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i @title = $1 || nil |