Skip to content

Commit

Permalink
attempt to fix ruby 2.7 error
Browse files Browse the repository at this point in the history
- FIXED: Ruby 2.7 error (again)
  • Loading branch information
ttscoff committed Dec 20, 2023
1 parent f502680 commit df9b781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mdless/console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ def color_meta(text)
m = Regexp.last_match
MDLess.log.info('Processing YAML header')
begin
MDLess.meta = YAML.load(m['content']).map { |k, v| "#{k.downcase}" => v }
MDLess.meta = YAML.load(m['content']).each_with_object({}) { |(k, v), h| h[k.downcase] = v }
rescue Psych::DisallowedClass => e
@log.error('Error reading YAML header')
@log.error(e)
Expand Down

0 comments on commit df9b781

Please sign in to comment.