Typescript port of HtmlDiff.Net which is itself a C# port of HtmlDiff
npm install htmldiff-javascriptDiffs two HTML blocks, and returns a meshing of the two that includes and elements. The classes of these elements are ins.diffins for new code, del.diffdel for removed code, and del.diffmod and ins.diffmod for sections of code that have been changed.
For "special tags" (primarily style tags such as and ), ins.mod elements are inserted with the new styles.
Typescript port of htmldiff.net.
Fork of htmldiff-js. With the following changes:
1. Typescript
2. Expose options from the HTMLDiff class
``bash`
npm install htmldiff-javascript
` Some old html herehtml
Some new html goes here
`javascript
import HtmlDiff from 'htmldiff-javascript'let oldHtml = document.getElementById('oldHtml')
let newHtml = document.getElementById('newHtml')
let diffHtml = document.getElementById('diffHtml')
diffHtml.innerHTML = HtmlDiff.execute(oldHtml.innerHTML, newHtml.innerHTML)
``- [x] Convert everything to typescript
- [ ] Add tests
- [ ] Setup Publishing Pipeline