tdreyno/middleman — Issue #135: Choking on non-escaped double quotation marks.
Author: arronmabrey
Created: 2011-10-16 18:00:49+00:00
State: open

On line 57 in front_matter.rb : middleman/lib/middleman/core_extensions/front_matter.rb

http://cl.ly/181F3k2q233n1n0x3w0N

The yaml_regex check that's checking the content is choking on non-escaped double quotation marks – `“` vs `“` – and presumably all non-escaped html entities.

Here's the method.

```
def parse_front_matter(content)
yaml_regex = /^(---\s*\n.*?\n?)^(---\s*$\n?)/m
if content =~ yaml_regex
begin
data = YAML.load($1)
rescue => e
puts "YAML Exception: #{e.message}"
end

content = content.split(yaml_regex).last
end

data ||= {}
[data, content]
end
```