0.2.3 • Published 8 years ago

rich-text-diff v0.2.3

Weekly downloads
171
License
ISC
Repository
-
Last release
8 years ago

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.

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago