diff --git a/lib/jekyll/tags/gist.rb b/lib/jekyll/tags/gist.rb index efeb62c3..0b40a5fd 100644 --- a/lib/jekyll/tags/gist.rb +++ b/lib/jekyll/tags/gist.rb @@ -7,7 +7,7 @@ module Jekyll class GistTag < Liquid::Tag 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_script_tag(gist_id, filename) else