class Markdowner def self.to_html(text) if text.blank? return "" else html = RDiscount.new(text.to_s, :smart, :autolink, :safelink, :filter_styles, :filter_html, :no_image).to_html # change

headings to just emphasis tags html.gsub!(/<(\/)?h(\d)>/) {|_| "<#{$1}strong>" } # fix links that got the trailing punctuation appended to move it outside # the link html.gsub!(/]+)([\.\!\,])">([^>]+)([\.\!\,])<\/a>/) {|_| if $2.to_s == $4.to_s "#{$3}#{$2}" else _ end } # make links have rel=nofollow html.gsub!(/