simple and flexible html to markdown converter
Switch branches/tags
Nothing to show
Clone or download
29decibel Merge pull request #13 from josh-works/master
fixes unordered lists, h1-h6 formatting
Latest commit 26c6a53 Sep 22, 2017

Simple html to Markdown ruby gem Code Climate

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

RSpec is our promise

p = :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}**"
p.markdown!.should be_include('strong text')


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

CLI usage

  • prints to stdout
html2markdown [file]
  • redirect to a new markdown file.
html2markdown index.html >


Buy me a Kindle book 📖