Pretty diff to html javascript library (diff2html)
Find a file
Rodrigo Fernandes 57f56978aa Merge pull request #14 from rtfpessoa/merge-npm
Merge npm package
2015-07-19 00:44:14 +01:00
bin merge npm package into main repo 2015-07-19 00:23:36 +01:00
css css fix to Y scrollbar on side by side diff 2015-07-18 23:22:36 +01:00
dist merge npm package into main repo 2015-07-19 00:23:36 +01:00
lib merge npm package into main repo 2015-07-19 00:23:36 +01:00
sample update to highlightjs 8.6 2015-07-18 23:38:17 +01:00
src merge npm package into main repo 2015-07-19 00:23:36 +01:00
.gitignore add npm and bower folder to gitignore and fix license on npm 2015-07-19 00:32:40 +01:00
bower.json merge npm package into main repo 2015-07-19 00:23:36 +01:00
LICENSE initial lines 2014-08-30 03:54:52 +01:00
package.json add npm and bower folder to gitignore and fix license on npm 2015-07-19 00:32:40 +01:00
README.md merge npm package into main repo 2015-07-19 00:23:36 +01:00
release.sh add release script 2015-05-03 14:09:07 +01:00

Diff to Html by rtfpessoa

Diff to Html generates pretty HTML diffs from git word diff output.

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

Distributions

How to use

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)

Check out the index.html for a complete example.

Contributions

All the 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.

Thanks

This project is inspired in pretty-diff by Scott González.