lib/github/mandoc.rb
def fix_implicit_paragraphs
				@doc.css("blockquote, div, dl, ol, p, pre, table, ul").each do |el|
					nodes = Nokogiri::XML::NodeSet.new @doc
					nodes << el.previous_sibling.unlink while inline? el.previous_sibling
					next if nodes.empty?

					p = @doc.create_element "p"
					p.children= nodes.reverse
					el.previous= p
				end
			end
# Collect text-nodes that precede the first block element
Collect text-nodes that precede the first block element
Collect text - nodes that precede the first block element
def fix_implicit_paragraphs
				@doc.css("blockquote, div, dl, ol, p, pre, table, ul").each do |el|
					nodes = Nokogiri::XML::NodeSet.new @doc
					nodes << el.previous_sibling.unlink while inline? el.previous_sibling
					next if nodes.empty?
					p = @doc.create_element "p"
					p.children= nodes.reverse
					el.previous= p
				end
			end
def fix_implicit_paragraphs @doc . css ( "blockquote, div, dl, ol, p, pre, table, ul" ) . each do | el | nodes = Nokogiri :: XML :: NodeSet . new @doc nodes << el . previous_sibling . unlink while inline? el . previous_sibling next if nodes . empty? p = @doc . create_element "p" p . children = nodes . reverse el . previous = p end end
Collect text-nodes that precede the first block element
Collect text - nodes that precede the first block element