Improve output of page to text with frontmatter

This commit is contained in:
Samy Pessé
2016-06-07 16:23:12 +02:00
parent f1d200b81b
commit 23aecb4f2b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ describe('Page', function() {
})
});
expect(page.toText()).toBe('---\nhello: world\n---\nHello World');
expect(page.toText()).toBe('---\nhello: world\n---\n\nHello World');
});
});
});
+1 -1
View File
@@ -44,7 +44,7 @@ Page.prototype.toText = function() {
return content;
}
var frontMatter = '---\n' + yaml.safeDump(attrs.toJS(), { skipInvalid: true }) + '---\n';
var frontMatter = '---\n' + yaml.safeDump(attrs.toJS(), { skipInvalid: true }) + '---\n\n';
return (frontMatter + content);
};