在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):29decibel/html2markdown开源软件地址(OpenSource Url):https://github.com/29decibel/html2markdown开源编程语言(OpenSource Language):Ruby 100.0%开源软件介绍(OpenSource Introduction):Simple html to Markdown ruby gemWe love markdown, cause it is friendly to edit. So we want everything to be markdown RSpec is our promisep = 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 install html2markdown
gem 'html2markdown' CLI usage
html2markdown [file]
html2markdown index.html > index.md DonationBuy me a Kindle book |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论