@ads-vdh/md-diff
v1.0.3
Published
A diffing implementation for comparing & returning markdown text deltas
Downloads
12
Readme
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"