get multiline yaml frontmatter

This commit is contained in:
Tom Preston-Werner 2008-11-05 18:11:58 -08:00
parent e4d07dc547
commit f4d8dcb64d
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ module AutoBlog
def read_yaml(base, name)
self.content = File.read(File.join(base, name))
if self.content =~ /^(---\n.*?)\n---\n/
if self.content =~ /^(---\n.*?)\n---\n/m
self.content = self.content[($1.size + 5)..-1]
self.data = YAML.load($1)