tie down the regex match on gist filenames

This commit is contained in:
Daniel Grieve 2013-03-17 11:29:42 +00:00
parent 6c5d001986
commit 22d1fdab54
1 changed files with 1 additions and 1 deletions

View File

@ -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