Pretty diff to html javascript library (diff2html)
colorizeddiffdiff2htmlgithacktoberfesthtmljavascriptparserprettysyntax-highlightingtypescriptunified-diffs
| .gitignore | ||
| diff2html.js | ||
| LICENSE | ||
| README.md | ||
| style.css | ||
| template.html | ||
Diff to Html by rtfpessoa
Diff to Html generates pretty HTML diffs from git word diff output.
Features
-
line-by-line diff (not side-by-side)
-
char-by-char highlight
-
new and old line numbers
-
inserted and removed lines
-
GitHub like style
Setup
Import the diff2html.js in your html.
Pretty Html From Git Word Diff Output
Diff2Html.getPrettyHtmlFromDiff(exInput);
Intermediate Json From Git Word Diff Output
Diff2Html.getJsonFromDiff(exInput);
Pretty Html From Json
Diff2Html.getPrettyHtmlFromJson(exInput);
Check out the
template.htmlfor 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.