Skip to content

Commit

Permalink
Strip special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
pathawks committed Dec 4, 2017
1 parent 965917b commit 55bbb0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/jekyll-gist/gist_tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module Jekyll
module Gist
class GistTag < Liquid::Tag
def render(context)
@special_characters = "#"
@encoding = context.registers[:site].config["encoding"] || "utf-8"
@settings = context.registers[:site].config["gist"]
if (tag_contents = determine_arguments(@markup.strip))
Expand All @@ -22,6 +23,7 @@ def render(context)
if context_contains_key?(context, filename)
filename = context[filename]
end
filename.delete!(@special_characters)
noscript_tag = gist_noscript_tag(gist_id, filename)
script_tag = gist_script_tag(gist_id, filename)
"#{noscript_tag}#{script_tag}"
Expand Down

0 comments on commit 55bbb0d

Please sign in to comment.