Ignore TOML front matter in addition to YAML (fixes #63).

This commit is contained in:
David Anson 2017-07-02 20:33:29 -07:00
parent 0e8cb8f0dd
commit 5bea80f5cd
9 changed files with 38 additions and 8 deletions

View file

@ -3,8 +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;
// Regular expression for matching common front matter (YAML and TOML)
module.exports.frontMatterRe = /^(---|\+\+\+)$[^]*?^\1$(\r\n|\r|\n)/m;
// Regular expression for matching inline disable/enable comments
module.exports.inlineCommentRe =