aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorrcmdnk <rcmdnk@gmail.com>2013-11-17 22:47:06 -0500
committerParker Moore <parkrmoore@gmail.com>2013-11-17 22:47:16 -0500
commit7f26224bb84e5fef01c4a55effd22fc2b7f1e9c4 (patch)
treecf8c73bd1068b136da2f64cffed0e48462dcb0be /plugins
parentabc9ef5113691ba19caf70b3e6d2984cc6b13fd9 (diff)
downloadmy_new_personal_website-7f26224bb84e5fef01c4a55effd22fc2b7f1e9c4.tar.xz
my_new_personal_website-7f26224bb84e5fef01c4a55effd22fc2b7f1e9c4.zip
Allow no last space for gist number only in gist tag
Closes #1394
Diffstat (limited to '')
-rw-r--r--plugins/gist_tag.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/gist_tag.rb b/plugins/gist_tag.rb
index 0828d270..9bdd14dc 100644
--- a/plugins/gist_tag.rb
+++ b/plugins/gist_tag.rb
@@ -23,11 +23,15 @@ module Jekyll
def render(context)
if parts = @text.match(/([a-zA-Z\d]*) (.*)/)
gist, file = parts[1].strip, parts[2].strip
+ else
+ gist, file = @text.strip, ""
+ end
+ if gist.empty?
+ ""
+ else
script_url = script_url_for gist, file
code = get_cached_gist(gist, file) || get_gist_from_web(gist, file)
html_output_for script_url, code
- else
- ""
end
end