diff --git a/examples/no-front-matter-with-hrs.md b/examples/no-front-matter-with-hrs.md new file mode 100644 index 0000000..9d3d544 --- /dev/null +++ b/examples/no-front-matter-with-hrs.md @@ -0,0 +1,13 @@ +---- + +Some markdown following a 4 dashes horizontal rule + +--- + +# Heading 1 followed by 3 _underscores_ + +___ + +--- + +Some more Markdown diff --git a/test/index.js b/test/index.js index b773125..4244af3 100644 --- a/test/index.js +++ b/test/index.js @@ -150,6 +150,19 @@ test('fm(string) - no front matter, markdown with hr', function (t) { }) }) +test('fm(string) - not a front matter, markdown with nastier hrs', function (t) { + fs.readFile( + path.resolve(__dirname, '../examples/no-front-matter-with-hrs.md'), + 'utf8', + function (err, data) { + t.error(err, 'read should not error') + + var content = fm(data) + t.equal(content.body, data) + t.end() + }) +}) + test('fm(string) - complex yaml', function (t) { fs.readFile( path.resolve(__dirname, '../examples/complex-yaml.md'),