diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/code_block.rb | 4 | ||||
-rw-r--r-- | plugins/gist_tag.rb | 2 | ||||
-rw-r--r-- | plugins/include_code.rb | 4 | ||||
-rw-r--r-- | plugins/jsfiddle.rb | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/plugins/code_block.rb b/plugins/code_block.rb index 660f73d7..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(/lang:\w+/i,'') + markup = markup.sub(/\s*lang:(\S+)/i,'') end if markup =~ CaptionUrlTitle @file = $1 diff --git a/plugins/gist_tag.rb b/plugins/gist_tag.rb index 2549ea7a..16203450 100644 --- a/plugins/gist_tag.rb +++ b/plugins/gist_tag.rb @@ -21,7 +21,7 @@ module Jekyll end def render(context) - if parts = @text.match(/([\d]*) (.*)/) + if parts = @text.match(/([a-zA-Z\d]*) (.*)/) gist, file = parts[1].strip, parts[2].strip script_url = script_url_for gist, file code = get_cached_gist(gist, file) || get_gist_from_web(gist, file) diff --git a/plugins/include_code.rb b/plugins/include_code.rb index fc6daa36..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(/lang:\w+/i,'') + markup = markup.strip.sub(/lang:\S+/i,'') end if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i @title = $1 || nil diff --git a/plugins/jsfiddle.rb b/plugins/jsfiddle.rb index a80becb3..0046f9b5 100644 --- a/plugins/jsfiddle.rb +++ b/plugins/jsfiddle.rb @@ -18,7 +18,7 @@ module Jekyll class JsFiddle < Liquid::Tag def initialize(tag_name, markup, tokens) - if /(?<fiddle>\w+)(?:\s+(?<sequence>[\w,]+))?(?:\s+(?<skin>\w+))?(?:\s+(?<height>\w+))?(?:\s+(?<width>\w+))?/ =~ markup + if /(?<fiddle>\w+\/?\d?)(?:\s+(?<sequence>[\w,]+))?(?:\s+(?<skin>\w+))?(?:\s+(?<height>\w+))?(?:\s+(?<width>\w+))?/ =~ markup @fiddle = fiddle @sequence = (sequence unless sequence == 'default') || 'js,resources,html,css,result' @skin = (skin unless skin == 'default') || 'light' |