Always return HashWithIndifferentAccess from frontmatter data

This commit is contained in:
Ben Hollis 2012-05-19 13:27:38 -07:00
parent 3356153d55
commit 7ad0f51d1a

View file

@ -115,15 +115,13 @@ module Middleman::CoreExtensions
if result = parse_yaml_front_matter(content) if result = parse_yaml_front_matter(content)
data, content = result data, content = result
data = ::Middleman::Util.recursively_enhance(data).freeze
elsif result = parse_json_front_matter(content) elsif result = parse_json_front_matter(content)
data, content = result data, content = result
data = ::Middleman::Util.recursively_enhance(data).freeze
else else
data = {} data = {}
end end
[data, content] [::Middleman::Util.recursively_enhance(data).freeze, content]
end end
def normalize_path(path) def normalize_path(path)
@ -185,4 +183,4 @@ module Middleman::CoreExtensions
end end
end end
end end