class Asciidoctor::Parser
def self.parse_description_list reader, match, parent
parent - The parent Block to which this description list belongs
match - The Regexp match for the head of the list
reader - The Reader from which to retrieve the description list
Internal: Parse and construct a description list Block from the current position of the Reader
def self.parse_description_list reader, match, parent list_block = List.new parent, :dlist # detects a description list item that uses the same delimiter (::, :::, :::: or ;;) sibling_pattern = DescriptionListSiblingRx[match[2]] list_block.items << (current_pair = parse_list_item reader, list_block, match, sibling_pattern) while reader.has_more_lines? && sibling_pattern =~ reader.peek_line next_pair = parse_list_item reader, list_block, $~, sibling_pattern if current_pair[1] list_block.items << (current_pair = next_pair) else current_pair[0] << next_pair[0][0] current_pair[1] = next_pair[1] end end list_block end