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.
This commit is contained in:
Michael Buffington 2013-06-11 15:37:15 -07:00
parent e83dfccc4f
commit 46be4c8fc4

View File

@ -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+)(?:\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'