Skip to content

Commit

Permalink
ruby: _helpers: Fix strict_variables mode (#296)
Browse files Browse the repository at this point in the history
Previously, strict mode was actually not enforced
  • Loading branch information
kohlschuetter authored Feb 2, 2024
1 parent 1f77a76 commit d8b276c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ruby/_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ def render(data, source, context = {})
context = jekyllContext({})
end
context.scopes[0] = data
Liquid::Template.parse(source, "strict_variables" => true).render!(context)
Liquid::Template.parse(source, "strict_variables" => true).render!(context, {:strict_variables => true})
end

else

def render(data = {}, source)
Liquid::Template.parse(source, {:strict_variables => true}).render!(data)
Liquid::Template.parse(source, {:strict_variables => true}).render!(data, {:strict_variables => true})
end
end

0 comments on commit d8b276c

Please sign in to comment.