diff2html/README.md

50 lines
1 KiB
Markdown
Raw Normal View History

2014-08-30 02:54:52 +00:00
# Diff to Html by [rtfpessoa](https://github.com/rtfpessoa)
2014-08-30 22:33:12 +00:00
Diff to Html generates pretty HTML diffs from git word diff output.
2014-08-30 02:54:52 +00:00
## Features
* line-by-line diff (not side-by-side)
2014-08-30 22:33:12 +00:00
* char-by-char highlight
2014-08-30 02:54:52 +00:00
* new and old line numbers
2014-08-30 22:33:12 +00:00
* inserted and removed lines
2014-08-30 02:54:52 +00:00
* GitHub like style
## Setup
2014-08-30 22:33:12 +00:00
Import the diff2html.js in your html.
> Pretty Html From Git Word Diff Output
Diff2Html.getPrettyHtmlFromDiff(exInput);
2014-08-30 02:54:52 +00:00
2014-08-30 22:33:12 +00:00
> Intermediate Json From Git Word Diff Output
Diff2Html.getJsonFromDiff(exInput);
> Pretty Html From Json
Diff2Html.getPrettyHtmlFromJson(exInput);
2014-08-30 02:54:52 +00:00
> Check out the `template.html` for a complete example.
2014-08-30 22:33:12 +00:00
## Contributions
2014-08-30 02:54:52 +00:00
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.
2014-08-30 22:33:12 +00:00
## Thanks
This project is inspired in [pretty-diff](https://github.com/scottgonzalez/pretty-diff) by [Scott González](https://github.com/scottgonzalez).
2014-08-30 02:54:52 +00:00
---