From baaa3fd14832b404c8089122a91aa4fc16a6cc47 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Sun, 12 Feb 2012 10:10:59 -0800 Subject: [PATCH] change little piece of frontmatter logic --- .../lib/middleman-core/core_extensions/front_matter.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb index f1fdcb80..6437b000 100644 --- a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb +++ b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb @@ -187,6 +187,8 @@ module Middleman::CoreExtensions::FrontMatter def parse_front_matter(content) yaml_regex = /^(---\s*\n.*?\n?)^(---\s*$\n?)/m if content =~ yaml_regex + content = content[($1.size + $2.size)..-1] + begin data = YAML.load($1) rescue => e @@ -194,7 +196,6 @@ module Middleman::CoreExtensions::FrontMatter return false end - content = content.split(yaml_regex).last else return false end