class Asciidoctor::AbstractBlock

def reindex_sections

Returns nothing

child sections or else the internal counters will be off.
IMPORTANT You must invoke this method on a node after removing

as it appears in document order.
and reassign the section 0-based index value to each Section
Walk the descendents of the current Document or Section

Internal: Reassign the section indexes
def reindex_sections
  @next_section_index = 0
  @next_section_ordinal = 1
  @blocks.each do |block|
    if block.context == :section
      assign_numeral block
      block.reindex_sections
    end
  end
end