Skip to content

feedbin/html_diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages