lib/github/mandoc.rb
def squash_empty_lines
				@doc.xpath("//text()").each do |node|
					next unless node.ancestors("pre").empty?

					text = node.content
						.gsub(/\R\K[ \t]+|[ \t]+\R/, "")
						.gsub(/(?:\R[ \t]*){2,}/, "\n")
					node.content= text
				end
			end
# Merge blank lines that aren't preformatted text
Merge blank lines that aren't preformatted text
Merge blank lines that aren ' t preformatted text
def squash_empty_lines
				@doc.xpath("//text()").each do |node|
					next unless node.ancestors("pre").empty?
					text = node.content
						.gsub(/\R\K[ \t]+|[ \t]+\R/, "")
						.gsub(/(?:\R[ \t]*){2,}/, "\n")
					node.content= text
				end
			end
def squash_empty_lines @doc . xpath ( "//text()" ) . each do | node | next unless node . ancestors ( "pre" ) . empty? text = node . content . gsub ( / \R \K [  \t ]+|[  \t ]+ \R / , "" ) . gsub ( / (?: \R [  \t ]*){2,} / , "\n" ) node . content = text end end
Merge blank lines that aren't preformatted text
Merge blank lines that aren ' t preformatted text