Skip to content

sethtippetts/rich-text-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rich Text Visual Difference

Now with Markdown™®! (Always with Markdown?)

Getting Started

Installation

npm i --save rich-text-diff

Usage

const diff = require('rich-text-diff') const str1 = ` # Some crazy markdown.  It's the best.  - List Item 1 - List Item 2 - List Item 3 ` const str2 = ` # Some completely sane markdown.  It's ok I guess.  - List Item 1 - List Item 3 ` diff(str1, str2) /*  * RETURNS:  * # Some <del>crazy</del><ins>completely</ins> <ins>sane </ins>markdown.  *  * It's <del>the</del><ins>ok</ins> <del>best</del><ins>I guess</ins>.  *  * - List Item 1  * - <del>List Item 2</del>  * - List Item 3  */

Just add your favorite Markdown parser and WHAMO! You have yourself a spicy rich text diffing sandwich.

About

Visualize differences in rich text (Markdown)

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors