diff-linetoword
v1.1.2
Published
Convert line diff to word diff
Downloads
2
Readme
diff-linetoword
Convert line diff to word diff.
Installation
$ npm install diff-linetoword
Usage
var diffLineToWord = require('diff-linetoword');
var patch = diffLineToWord('@@ -8,7 +8,7 @@ ....');
Options can be passed as a second argument: added
and removed
to change the markup of the diff.
Example to output HTML:
var htmlPatch = diffLineToWord('@@ -8,7 +8,7 @@ ....', {
added: '<span class="added">%s</span>',
removed: '<span class="removed">%s</span>'
});