1.1.2 • Published 8 years ago

diff-linetoword v1.1.2

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
8 years ago

diff-linetoword

Build Status

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>'
});