class Kramdown::Parser::Kramdown
def update_tree(element)
Update the tree by parsing all :+raw_text+ elements with the span-level parser (resets the
def update_tree(element) last_blank = nil element.children.map! do |child| if child.type == :raw_text last_blank = nil reset_env(src: ::Kramdown::Utils::StringScanner.new(child.value, element.options[:location]), text_type: :text) parse_spans(child) child.children elsif child.type == :eob update_attr_with_ial(child.attr, child.options[:ial]) if child.options[:ial] [] elsif child.type == :blank if last_blank last_blank.value << child.value [] else last_blank = child child end else last_blank = nil update_tree(child) update_attr_with_ial(child.attr, child.options[:ial]) if child.options[:ial] # DEPRECATED: option auto_id_stripping will be removed in 2.0 because then this will be # the default behaviour if child.type == :dt || (child.type == :header && @options[:auto_id_stripping]) update_raw_text(child) end child end end.flatten! end