Skip to content

Commit

Permalink
resolves #551 don't crash if theme file is empty (PR #552)
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux authored Sep 12, 2016
1 parent bd7d5a8 commit c12cb55
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/asciidoctor-pdf/theme_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def self.load_file filename, theme_data = nil

def load hash, theme_data = nil
theme_data ||= ::OpenStruct.new
return theme_data unless ::Hash === hash
hash.inject(theme_data) {|data, (key, val)| process_entry key, val, data }
# NOTE remap legacy running content keys (e.g., header_recto_content_left => header_recto_left_content)
%w(header_recto header_verso footer_recto footer_verso).each do |periphery_face|
Expand Down

0 comments on commit c12cb55

Please sign in to comment.