Kramdown::Parser::Kramdown::Parser::Kramdown
# File lib/kramdown/parser/gfm.rb, line 19 def parse_paragraph result = @src.scan(PARAGRAPH_MATCH) while !@src.match?(self.class::PARAGRAPH_END) result << @src.scan(PARAGRAPH_MATCH) end result.chomp! unless @tree.children.last && @tree.children.last.type == :p @tree.children << new_block_el(:p) end lines = result.lstrip.split(/\n/) lines.each_with_index do |line, index| @tree.children.last.children << Element.new(@text_type, line) << Element.new(:br) << Element.new(@text_type, "\n") end @tree.children.last.children.pop # added one \n too many @tree.children.last.children.pop # added one :br too many true end
Generated with the Darkfish Rdoc Generator 2.