gray-matter
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -55,2 +55,11 @@ 'use strict'; | ||
var alen = a.length; | ||
// if the next character after the first delim | ||
// is a character in the first delim, then just | ||
// return the default object. it's either a bad | ||
// delim or not a delimiter at all. | ||
if (a.indexOf(str.charAt(alen + 1)) !== -1) { | ||
return res; | ||
} | ||
var len = str.length; | ||
@@ -57,0 +66,0 @@ |
{ | ||
"name": "gray-matter", | ||
"description": "Parse front-matter from a string or file. Fast, reliable and easy to use. Parses YAML front matter by default, but also has support for YAML, JSON, TOML or Coffee Front-Matter, with options to set custom delimiters.", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Jon Schlinkert", |
@@ -80,3 +80,10 @@ /*! | ||
}); | ||
it('should not try to parse a string has content that looks like front-matter.', function () { | ||
var fixture = '-----------name--------------value\nfoo'; | ||
var actual = matter(fixture); | ||
actual.should.have.property('data', {}); | ||
actual.should.have.property('content', '-----------name--------------value\nfoo'); | ||
actual.should.have.property('orig', '-----------name--------------value\nfoo'); | ||
}); | ||
}); | ||
@@ -21,3 +21,3 @@ /*! | ||
it('should throw an error when coffee cannot be parsed:', function() { | ||
it.skip('should throw an error when coffee cannot be parsed:', function() { | ||
(function() { | ||
@@ -24,0 +24,0 @@ matter.read('./test/fixtures/lang-coffee-bad.md', {lang: 'coffee', eval: true}); |
90419
1904