tie down the regex match on gist filenames
This commit is contained in:
parent
6c5d001986
commit
22d1fdab54
|
@ -7,7 +7,7 @@
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class GistTag < Liquid::Tag
|
class GistTag < Liquid::Tag
|
||||||
def render(context)
|
def render(context)
|
||||||
if tag_contents = @markup.match(/(\d+) (.*)/)
|
if tag_contents = @markup.strip.match(/\A(\d+) ?(\S*)\z/)
|
||||||
gist_id, filename = tag_contents[1].strip, tag_contents[2].strip
|
gist_id, filename = tag_contents[1].strip, tag_contents[2].strip
|
||||||
gist_script_tag(gist_id, filename)
|
gist_script_tag(gist_id, filename)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue