Skip to content

jung-kim/diff2html-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diff to Html Node Module by rtfpessoa

Diff to Html generates pretty HTML diffs.

Inspiration

This project uses diff2html as base.

Features

  • line-by-line and side-by-side diff

  • new and old line numbers

  • inserted and removed lines

  • GitHub like style

Online Example

Go to Diff2HTML

Other Distributions

Setup

sudo npm install -g diff2html

Usage

Require the library using:

var Diff2Html = require('diff2html').Diff2Html;

Pretty Line-by-Line Html From Git Word Diff Output

Diff2Html.getPrettyHtmlFromDiff(exInput)

Pretty Side-by-Side Html From Git Word Diff Output

Diff2Html.getPrettySideBySideHtmlFromDiff(exInput)

Intermediate Json From Git Word Diff Output

Diff2Html.getJsonFromDiff(exInput)

Pretty Line-by-Line Html From Json

Diff2Html.getPrettyHtmlFromJson(exInput)

Pretty Side-by-Side Html From Json

Diff2Html.getPrettySideBySideHtmlFromJson(exInput)

Contribution

All contributions are welcome.

To contribute just send a pull request with your feature,fix,... and it will be reviewed asap.

License

Copyright 2014 Rodrigo Fernandes. Released under the terms of the MIT license.


About

Simple Diff to Html Node Module (diff2html)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published