class Kramdown::Parser::Kramdown
def parse_raw_html(el)
Parse raw HTML until the matching end tag for +el+ is found or until the end of the
def parse_raw_html(el) @stack.push(@tree) @tree = el done = false endpos = nil while !@src.eos? && !done if result = @src.scan_until(HTML_RAW_START) endpos = @src.pos add_text(result, @tree, :html_text) if @src.scan(HTML_TAG_RE) handle_html_start_tag elsif @src.scan(HTML_TAG_CLOSE_RE) if @tree.value == @src[1] done = true else warning("Found invalidly used HTML closing tag for '#{@src[1]}' - ignoring it") end else add_text(@src.scan(/./), @tree, :html_text) end else result = @src.scan(/.*/m) add_text(result, @tree, :html_text) warning("Found no end tag for '#{@tree.value}' - auto-closing it") done = true end end @tree = @stack.pop endpos end