simple and flexible html to markdown converter
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits ahead, 10 commits behind 29decibel:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
fixtures/vcr_cassettes
lib
spec
.gitignore
Gemfile
License-MIT
Rakefile
Readme.md
html2markdown.gemspec

Readme.md

Simple html to Markdown ruby gem

We love markdown, cause it is friendly to edit. So we want everything to be markdown

RSpec is our promise

p = HTMLPage.new :contents => '<strong>haha</strong>'
p.markdown.should == '**haha**'
p.contents = '<strong>hehe</strong>'
p.markdown!.should == '**hehe**'

# you can also define your own node parse
p.strong do |node,contents|
  "strong text : **#{contents}**"
end
p.markdown!.should be_include('strong text')

Installation

  • gem
gem install html2markdown
  • Rails Gemfile
gem 'html2markdown'