From 46be4c8fc4948f3050a20de59376d46276f9673e Mon Sep 17 00:00:00 2001 From: Michael Buffington Date: Tue, 11 Jun 2013 15:37:15 -0700 Subject: [PATCH 1/2] Adjusted JsFiddle plugin to detect jsFiddle versions. Prior to this change, {% jsFiddle ccWP7/5 result,js,html %} wouldn't render the desired tab order properly since the regex pattern was being capturing the /5 as part of the first of the tabs. --- plugins/jsfiddle.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jsfiddle.rb b/plugins/jsfiddle.rb index a80becb..9dcf57e 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 /(?\w+)(?:\s+(?[\w,]+))?(?:\s+(?\w+))?(?:\s+(?\w+))?(?:\s+(?\w+))?/ =~ markup + if /(?\w+)(?:\s+(?[\w,\/]+))?(?:\s+(?\w+))?(?:\s+(?\w+))?(?:\s+(?\w+))?/ =~ markup @fiddle = fiddle @sequence = (sequence unless sequence == 'default') || 'js,resources,html,css,result' @skin = (skin unless skin == 'default') || 'light' From a2ee7a0af13216e8c68882460350680d7048bb7e Mon Sep 17 00:00:00 2001 From: Michael Buffington Date: Tue, 11 Jun 2013 16:00:14 -0700 Subject: [PATCH 2/2] Revised the regex for JsFiddle plugin after further testing. --- plugins/jsfiddle.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jsfiddle.rb b/plugins/jsfiddle.rb index 9dcf57e..0046f9b 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 /(?\w+)(?:\s+(?[\w,\/]+))?(?:\s+(?\w+))?(?:\s+(?\w+))?(?:\s+(?\w+))?/ =~ markup + if /(?\w+\/?\d?)(?:\s+(?[\w,]+))?(?:\s+(?\w+))?(?:\s+(?\w+))?(?:\s+(?\w+))?/ =~ markup @fiddle = fiddle @sequence = (sequence unless sequence == 'default') || 'js,resources,html,css,result' @skin = (skin unless skin == 'default') || 'light'