Skip to content

Commit 13e6357

Browse files
committed
cleaned up gist_script_tag method
1 parent 6ea01cf commit 13e6357

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/jekyll-gist/gist_tag.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ def determine_arguments(input)
4040
end
4141

4242
def gist_script_tag(gist_id, filename = nil)
43-
if filename.empty?
44-
"<script src=\"https://gist.github.com/#{gist_id}.js\"> </script>"
45-
else
46-
"<script src=\"https://gist.github.com/#{gist_id}.js?file=#{filename}\"> </script>"
47-
end
43+
url = "https://gist.github.com/#{gist_id}.js"
44+
url = "#{url}?file=#{filename}" unless filename.empty?
45+
"<script src=\"#{url}\"> </script>"
4846
end
4947

5048
def gist_noscript_tag(gist_id, filename = nil)

0 commit comments

Comments
 (0)