Strip space from the gist number, add test for gist tag

This commit is contained in:
Parker Moore
2013-02-24 00:57:58 +01:00
parent 425f466842
commit 7e7cee6e56
2 changed files with 20 additions and 2 deletions

View File

@@ -7,11 +7,11 @@ module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, gist, tokens)
super
@gist = gist
@gist = gist.strip
end
def render(context)
"<script src=\"http://gist.github.com/#{@gist}.js\" type=\"text/javascript\"></script>"
"<script src=\"http://gist.github.com/#{@gist}.js\" type=\"text/javascript\"> </script>"
end
end
end