Automatically ignore common front matter; provide option for customization (fixes #2).

This commit is contained in:
David Anson 2015-07-25 22:18:30 -07:00
parent cae451967a
commit a467f8b3e6
11 changed files with 134 additions and 54 deletions

View file

@ -3,5 +3,8 @@
// Regular expression for matching common newline characters
module.exports.newLineRe = /\r\n|\r|\n/;
// Regular expression for matching common front matter
module.exports.frontMatterRe = /^---$[^]*?^---$(\r\n|\r|\n)/m;
// readFile options for reading with the UTF-8 encoding
module.exports.utf8Encoding = { "encoding": "utf8" };