lib/krane/renderer.rb in krane-2.3.1 vs lib/krane/renderer.rb in krane-2.3.2
- old
+ new
@@ -56,10 +56,10 @@
partial_path = find_partial(partial)
template = File.read(partial_path)
expanded_template = ERB.new(template, trim_mode: '-').result(erb_binding)
- docs = Psych.parse_stream(expanded_template, partial_path)
+ docs = Psych.parse_stream(expanded_template, filename: partial_path)
# If the partial contains multiple documents or has an explicit document header,
# we know it cannot validly be indented in the parent, so return it immediately.
return expanded_template unless docs.children.one? && docs.children.first.implicit
# Make sure indentation isn't a problem by producing a single line of parseable YAML.
# Note that JSON is a subset of YAML.