Module: HyperTextMarkDown

Defined in:
lib/hypertextmarkdown.rb,
lib/hypertextmarkdown/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.to_markdown(str) ⇒ Object



9
10
11
12
13
# File 'lib/hypertextmarkdown.rb', line 9

def to_markdown(str)
  html = Nokogiri::HTML(str)
  # pre-processing / xpath selection here
  html.children.map{|child| mark_element(child)}.join
end