No description or website provided.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
html_diff.gemspec

README.md

HTMLDiff

Compare HTML and Markdown using inline or side-by-side diffs.

The code for this is extracted from Discourse. This just packages it as a standalone gem.

Installation

Add this line to your application's Gemfile:

gem 'html_diff', github: 'feedbin/html_diff'

Usage

require "html_diff"

# Generate inline HTML diff
HTMLDiff::Diff.new(before, after).inline_html

# Generate side-by-side HTML diff
HTMLDiff::Diff.new(before, after).side_by_side_html

# Generate side-by-side Markdown diff
HTMLDiff::Diff.new(before, after).side_by_side_markdown