def parse_block_html
if result = @src.scan(HTML_COMMENT_RE)
@tree.children << Element.new(:xml_comment, result, nil, :category => :block)
@src.scan(TRAILING_WHITESPACE)
true
elsif result = @src.scan(HTML_INSTRUCTION_RE)
@tree.children << Element.new(:xml_pi, result, nil, :category => :block)
@src.scan(TRAILING_WHITESPACE)
true
else
if result = @src.check(/^#{OPT_SPACE}#{HTML_TAG_RE}/) && !HTML_SPAN_ELEMENTS.include?(@src[1].downcase)
@src.pos += @src.matched_size
handle_html_start_tag(&method(:handle_kramdown_html_tag))
Kramdown::Parser::Html::ElementConverter.convert(@root, @tree.children.last) if @options[:html_to_native]
true
elsif result = @src.check(/^#{OPT_SPACE}#{HTML_TAG_CLOSE_RE}/) && !HTML_SPAN_ELEMENTS.include?(@src[1].downcase)
name = @src[1].downcase
if @tree.type == :html_element && @tree.value == name
@src.pos += @src.matched_size
throw :stop_block_parsing, :found
else
false
end
else
false
end
end
end