Skip to content
This repository has been archived by the owner on Jun 24, 2018. It is now read-only.

Commit

Permalink
heading fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasiliy Yorkin committed Jul 8, 2013
1 parent f48effd commit f4c1d66
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/docxtor2/package/document/heading.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module Docxtor2
class Package::Document::Heading < Package::Document::Paragraph
def initialize(nesting = 1, &block)
super({ :style => nesting }, &block)
H1 = 1
H2 = 2

def initialize(nesting = H1, *args, &block)
super(*args, &block)
@attrs[:style] ||= nesting
end
end
end

0 comments on commit f4c1d66

Please sign in to comment.