module RD::RD2HTMLExtVisitor::EnableBr
Enable
Public Instance Methods
apply_to_TextBlock(element, content)
click to toggle source
# File lib/rd/rd2html-ext-lib.rb, line 128 def apply_to_TextBlock(element, content) if (element.parent.is_a?(ItemListItem) or element.parent.is_a?(EnumListItem)) and consist_of_one_textblock?(element.parent) content.join.chomp else content = content.delete_if{|x| x == "\n"}.join("").gsub(/\n/, "<br />\n") %Q[<p>#{content.chomp}</p>] end end