lib/asciidoctor/section.rb in asciidoctor-2.0.0.rc.2 vs lib/asciidoctor/section.rb in asciidoctor-2.0.0.rc.3

- old
+ new

@@ -109,17 +109,10 @@ # # => 1,1,1 # # Returns the section number as a String def sectnum(delimiter = '.', append = nil) append ||= (append == false ? '' : delimiter) - if @level == 1 - %(#{@numeral}#{append}) - elsif @level > 1 - Section === @parent ? %(#{@parent.sectnum(delimiter, delimiter)}#{@numeral}#{append}) : %(#{@numeral}#{append}) - else # @level == 0 - # NOTE coerce @numeral to int just in case not set; can happen if section nesting is out of sequence - %(#{Helpers.int_to_roman @numeral.to_i}#{append}) - end + @level > 1 && Section === @parent ? %(#{@parent.sectnum(delimiter, delimiter)}#{@numeral}#{append}) : %(#{@numeral}#{append}) end # (see AbstractBlock#xreftext) def xreftext xrefstyle = nil if (val = reftext) && !val.empty?