Fixed front matter empty lines

This commit is contained in:
benweet 2014-04-21 20:13:39 +01:00
parent d6acc601d3
commit 379ee55372

View File

@ -23,12 +23,13 @@ define([
return;
}
var results = regex.exec(content);
var frontMatter = results[1];
var yaml = results[2];
if(!yaml) {
fileDesc.frontMatter = undefined;
}
else if(!fileDesc.frontMatter || fileDesc.frontMatter._yaml != yaml) {
else if(!fileDesc.frontMatter || fileDesc.frontMatter._frontMatter != frontMatter) {
fileDesc.frontMatter = undefined;
try {
fileDesc.frontMatter = YAML.parse(yaml);
@ -36,7 +37,7 @@ define([
fileDesc.frontMatter = undefined;
}
fileDesc.frontMatter._yaml = yaml;
fileDesc.frontMatter._frontMatter = results[1];
fileDesc.frontMatter._frontMatter = frontMatter;
}
catch (e) {
}