Correct offenses reported by RuboCop 1.6.0
This commit is contained in:
parent
84deb286ed
commit
c70437e2de
|
@ -41,7 +41,7 @@ module Jekyll
|
|||
begin
|
||||
self.content = File.read(filename, **Utils.merged_file_read_opts(site, opts))
|
||||
if content =~ Document::YAML_FRONT_MATTER_REGEXP
|
||||
self.content = $POSTMATCH
|
||||
self.content = Regexp.last_match.post_match
|
||||
self.data = SafeYAML.load(Regexp.last_match(1))
|
||||
end
|
||||
rescue Psych::SyntaxError => e
|
||||
|
|
|
@ -483,7 +483,7 @@ module Jekyll
|
|||
def read_content(**opts)
|
||||
self.content = File.read(path, **Utils.merged_file_read_opts(site, opts))
|
||||
if content =~ YAML_FRONT_MATTER_REGEXP
|
||||
self.content = $POSTMATCH
|
||||
self.content = Regexp.last_match.post_match
|
||||
data_file = SafeYAML.load(Regexp.last_match(1))
|
||||
merge_data!(data_file, :source => "YAML front matter") if data_file
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue