# File lib/asciidoctor/parser.rb, line 1684
  def self.is_two_line_section_title?(line1, line2)
    if line1 && line2 && SECTION_LEVELS.has_key?(line2.chr) &&
        line2 =~ SetextSectionLineRx && line1 =~ SetextSectionTitleRx &&
        # chomp so that a (non-visible) endline does not impact calculation
        (line_length(line1) - line_length(line2)).abs <= 1
      section_level line2
    else
      false
    end
  end