convertible: use Document::YAML_FRONT_MATTER_REGEXP to parse transformable files

This commit is contained in:
Parker Moore 2016-04-13 23:22:05 -04:00
parent 519c3eb51f
commit f210cafdf2
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ module Jekyll
begin
self.content = File.read(site.in_source_dir(base, name),
Utils.merged_file_read_opts(site, opts))
if content =~ /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m
if content =~ Document::YAML_FRONT_MATTER_REGEXP
self.content = $POSTMATCH
self.data = SafeYAML.load(Regexp.last_match(1))
end