diff-linetoword

1.1.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i diff-linetoword

Weekly Downloads

1

Version

1.1.2

License

Apache-2.0

Last publish

Collaborators

  • samypesse