A summary of data about the Ruby ecosystem.

https://github.com/xijo/reverse_markdown

Ruby gem to convert html into markdown
https://github.com/xijo/reverse_markdown

Keywords from Contributors

activejob activerecord mvc rubygems feature-flag rspec rack test-coverage coverage-report coverage-library

Last synced: about 2 hours ago
JSON representation

Repository metadata

Ruby gem to convert html into markdown

README.md

Summary

Transform html into markdown. Useful for example if you want to import html into your markdown based application.

Build Status Gem Version Code Climate Test Coverage

Changelog

See Change Log

Limitations

A perfect HTML to Markdown conversion is not possible. HTML is far more expressive than Markdown - it supports tables with merged cells, arbitrary nesting, inline styles, and countless other features that have no Markdown equivalent.

This gem aims to provide good enough defaults for most common cases. It handles standard content well but does not attempt to solve every edge case. If you have highly specific conversion needs, you can write custom converters to handle them.

Requirements

  1. Nokogiri
  2. Ruby 2.7.0 or higher

Installation

Install the gem

[sudo] gem install reverse_markdown

or add it to your Gemfile

gem 'reverse_markdown'

Features

  • Supports all the established html tags like h1, h2, h3, h4, h5, h6, p, em, strong, i, b, blockquote, code, img, a, hr, li, ol, ul, table, tr, th, td, br, figure
  • Module based - if you miss a tag, just add it
  • Can deal with nested lists
  • Inline and block code is supported
  • Supports blockquote

Usage

Ruby

You can convert html content as string or Nokogiri document:

input  = '<strong>feelings</strong>'
result = ReverseMarkdown.convert input
result.inspect # " **feelings** "

Commandline

It's also possible to convert html files to markdown using the binary:

$ reverse_markdown file.html > file.md
$ cat file.html | reverse_markdown > file.md

Configuration

The following options are available:

  • unknown_tags (default pass_through) - how to handle unknown tags. Valid options are:
    • pass_through - Include the unknown tag completely into the result
    • drop - Drop the unknown tag and its content
    • bypass - Ignore the unknown tag but try to convert its content
    • raise - Raise an error to let you know
  • github_flavored (default false) - use github flavored markdown (yet only code blocks are supported)
  • tag_border (default ' ') - how to handle tag borders. valid options are:
    • ' ' - Add whitespace if there is none at tag borders.
    • '' - Do not not add whitespace.

As options

Just pass your chosen configuration options in after the input. The given options will last for this operation only.

ReverseMarkdown.convert(input, unknown_tags: :raise, github_flavored: true)

Preconfigure

Or configure it block style on a initializer level. These configurations will last for all conversions until they are set to something different.

ReverseMarkdown.config do |config|
  config.unknown_tags     = :bypass
  config.github_flavored  = true
  config.tag_border  = ''
end

Related stuff

Thanks

Thanks to all contributors and all other helpers:


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 2 days ago

Total Commits: 194
Total Committers: 44
Avg Commits per committer: 4.409
Development Distribution Score (DDS): 0.366

Commits in past year: 10
Committers in past year: 3
Avg Commits per committer in past year: 3.333
Development Distribution Score (DDS) in past year: 0.2

Name Email Commits
Johannes Opper x****o@g****e 123
Mal Curtis m****l@s****m 7
Harlan T Wood h****n@t****m 7
Shane Andrade m****2@g****m 4
Masataka Pocke Kuwabara k****a@p****e 4
Henry Poydar h****r@g****m 3
rgould r****d@g****m 2
anshul78 6****8 2
unknown x****o@.****) 2
Craig Day c****y@z****m 2
Easy-D e****1@g****m 2
Gustav Munkby g****v@g****m 2
Olle Jonsson o****n@g****m 2
Will Glynn w****l@w****m 2
Dan Schultzer d****n@d****m 1
Damien White d****e@v****m 1
Anton Rieder 1****r 1
AlexanderPruss a****s@k****e 1
Faheem Mughal f****l@a****m 1
Glen Stampoultzis g****s@e****m 1
mizoryu s****u@y****m 1
Markus Schirp m****j@s****t 1
userhas404d 2****d 1
gecunps g****u@n****t 1
arunthampi a****i@g****m 1
Suraj N. Kurapati s****u@g****m 1
Stephen Roberts s****s@g****m 1
Spyros Livathinos l****s@g****m 1
Shiva Bhusal h****a@g****m 1
Pat Allan p****t@f****m 1
and 14 more...

Committer domains:


Issue and Pull Request metadata

Last synced: about 1 month ago

Total issues: 41
Total pull requests: 69
Average time to close issues: about 1 year
Average time to close pull requests: 4 months
Total issue authors: 34
Total pull request authors: 52
Average comments per issue: 3.8
Average comments per pull request: 1.74
Merged pull request: 52
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 6
Past year average time to close issues: N/A
Past year average time to close pull requests: 1 day
Past year issue authors: 0
Past year pull request authors: 3
Past year average comments per issue: 0
Past year average comments per pull request: 0.17
Past year merged pull request: 4
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/xijo/reverse_markdown

Top Issue Authors

  • bkazez (3)
  • aprescott (3)
  • drewish (2)
  • benbalter (2)
  • fauno (2)
  • vanboom (1)
  • shivabhusal (1)
  • harlantwood (1)
  • danschultzer (1)
  • maestromac (1)
  • movermeyer (1)
  • burlesona (1)
  • AlexanderPruss (1)
  • coezbek (1)
  • cainianhua (1)

Top Pull Request Authors

  • xijo (6)
  • harlantwood (3)
  • stephencroberts (2)
  • craig-day (2)
  • Kevinrob (2)
  • pocke (2)
  • olleolleolle (2)
  • pat (2)
  • gagandeepsinghj (2)
  • leon (2)
  • Benjamin-Dobell (2)
  • faheemmughal (2)
  • schkovich (1)
  • Sija (1)
  • mudasobwa (1)

Top Issue Labels

Top Pull Request Labels


Package metadata

gem.coop: reverse_markdown

Map simple html back into markdown, e.g. if you want to import existing html data in your application.

  • Homepage: http://github.com/xijo/reverse_markdown
  • Documentation: http://www.rubydoc.info/gems/reverse_markdown/
  • Licenses: WTFPL
  • Latest release: 3.0.2 (published about 1 month ago)
  • Last Synced: 2026-03-01T07:03:41.068Z (2 days ago)
  • Versions: 36
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 92,673,900 Total
  • Docker Downloads: 449,512,827
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.135%
    • Docker downloads count: 0.249%
    • Downloads: 0.291%
  • Maintainers (2)
debian-13: ruby-reverse-markdown

  • Homepage: https://github.com/xijo/reverse_markdown
  • Documentation: https://packages.debian.org/trixie/ruby-reverse-markdown
  • Licenses: wtfpl
  • Latest release: 3.0.0-1 (published 19 days ago)
  • Last Synced: 2026-02-13T13:19:08.268Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.308%
    • Forks count: 0.576%
    • Stargazers count: 0.655%
rubygems.org: reverse_markdown

Map simple html back into markdown, e.g. if you want to import existing html data in your application.

  • Homepage: http://github.com/xijo/reverse_markdown
  • Documentation: http://www.rubydoc.info/gems/reverse_markdown/
  • Licenses: WTFPL
  • Latest release: 3.0.2 (published about 1 month ago)
  • Last Synced: 2026-03-01T21:32:11.252Z (1 day ago)
  • Versions: 36
  • Dependent Packages: 51
  • Dependent Repositories: 3,678
  • Downloads: 92,683,130 Total
  • Docker Downloads: 449,512,827
  • Rankings:
    • Docker downloads count: 0.308%
    • Downloads: 0.379%
    • Dependent repos count: 0.52%
    • Dependent packages count: 0.53%
    • Average: 1.025%
    • Forks count: 2.107%
    • Stargazers count: 2.307%
  • Maintainers (2)
proxy.golang.org: github.com/xijo/reverse_markdown

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/xijo/reverse_markdown#section-documentation
  • Licenses: wtfpl
  • Latest release: v3.0.2+incompatible (published about 1 month ago)
  • Last Synced: 2026-02-28T11:02:42.776Z (3 days ago)
  • Versions: 32
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Forks count: 2.026%
    • Stargazers count: 2.039%
    • Average: 4.379%
    • Dependent packages count: 6.508%
    • Dependent repos count: 6.945%
ubuntu-23.10: ruby-reverse-markdown

  • Homepage: https://github.com/xijo/reverse_markdown
  • Licenses:
  • Latest release: 1.4.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T18:31:30.167Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.04: ruby-reverse-markdown

  • Homepage: https://github.com/xijo/reverse_markdown
  • Licenses:
  • Latest release: 2.1.1-1ubuntu1 (published 25 days ago)
  • Last Synced: 2026-02-06T15:56:19.936Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-20.04: ruby-reverse-markdown

  • Homepage: https://github.com/xijo/reverse_markdown
  • Licenses:
  • Latest release: 1.4.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T07:21:48.580Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.04: ruby-reverse-markdown

  • Homepage: https://github.com/xijo/reverse_markdown
  • Licenses:
  • Latest release: 1.4.0-1 (published 20 days ago)
  • Last Synced: 2026-02-11T06:48:32.779Z (20 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-reverse-markdown

  • Homepage: https://github.com/xijo/reverse_markdown
  • Licenses:
  • Latest release: 2.1.1-1ubuntu1 (published 22 days ago)
  • Last Synced: 2026-02-09T17:09:19.474Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-11: ruby-reverse-markdown

  • Homepage: https://github.com/xijo/reverse_markdown
  • Documentation: https://packages.debian.org/bullseye/ruby-reverse-markdown
  • Licenses:
  • Latest release: 1.4.0-1 (published 21 days ago)
  • Last Synced: 2026-02-13T08:24:21.691Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-22.04: ruby-reverse-markdown

  • Homepage: https://github.com/xijo/reverse_markdown
  • Licenses:
  • Latest release: 1.4.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T13:24:38.595Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-12: ruby-reverse-markdown

  • Homepage: https://github.com/xijo/reverse_markdown
  • Documentation: https://packages.debian.org/bookworm/ruby-reverse-markdown
  • Licenses:
  • Latest release: 1.4.0-1 (published 19 days ago)
  • Last Synced: 2026-02-12T23:39:46.640Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:

Dependencies

reverse_markdown.gemspec rubygems
  • byebug >= 0 development
  • codeclimate-test-reporter >= 0 development
  • kramdown >= 0 development
  • rake >= 0 development
  • rspec >= 0 development
  • simplecov >= 0 development
  • nokogiri >= 0
Gemfile rubygems
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • ruby/setup-ruby v1 composite

Score: 31.1105631977944