Is it possible to convert HTML with Nokogiri to plain text? I also want to include
tag.
For example, given this HTML:
Nokogiri will strip out links, so I use this first to preserve links in the text version:
html_version.gsub!(/(.*)<\/a>/i) { "#{$2}\n#{$1}" }
that will turn this:
link to google
to this:
link to google
http://google.com