@ads-vdh/md-diff

1.0.3 • Public • Published

About

A diffing implementation for comparing & returning markdown text deltas

Wraps difflib and provides deltas as text via demarcating edits tags:

Example

oldText: your question site
newText: your answer site
output: your <del>question</del> <ins>answer</ins> site

Installation

Install on npm

npm install @ads-vdh/md-diff --save

Usage

let diffText = require("@ads-vdh/md-diff")

let oldText = "your question site"
let newText = "your answer site"

let output = diffText(oldText, newText, false)

console.log(output)
// "your <del>question</del> <ins>answer</ins> site"

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    1
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @ads-vdh/md-diff

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

6.39 kB

Total Files

3

Last publish

Collaborators

  • ads-vdh-user
  • bcnowak
  • jmathias3
  • kyle-mit-vdh