update README
This commit is contained in:
parent
cc9d271cc0
commit
fde1df3a6a
1 changed files with 22 additions and 11 deletions
33
README.md
33
README.md
|
|
@ -1,31 +1,38 @@
|
||||||
# Diff to Html by [rtfpessoa](https://github.com/rtfpessoa)
|
# Diff to Html by [rtfpessoa](https://github.com/rtfpessoa)
|
||||||
|
|
||||||
Diff to Html generates pretty HTML diffs from regular command line tools output.
|
Diff to Html generates pretty HTML diffs from git word diff output.
|
||||||
|
|
||||||
### Inspiration
|
|
||||||
|
|
||||||
This project is inspired in [pretty-diff](https://github.com/scottgonzalez/pretty-diff) by [Scott González](https://github.com/scottgonzalez).
|
|
||||||
This project started with some code from `pretty-diff` but it was then re-written and is now a
|
|
||||||
browser library.
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* line-by-line diff (not side-by-side)
|
* line-by-line diff (not side-by-side)
|
||||||
|
|
||||||
|
* char-by-char highlight
|
||||||
|
|
||||||
* new and old line numbers
|
* new and old line numbers
|
||||||
|
|
||||||
|
* inserted and removed lines
|
||||||
|
|
||||||
* GitHub like style
|
* GitHub like style
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
> Simply import the diff2html.js invoke:
|
Import the diff2html.js in your html.
|
||||||
|
|
||||||
var diff2Html = Diff2Html.getInstance();
|
> Pretty Html From Git Word Diff Output
|
||||||
diff2Html.generatePrettyDiff(exInput);
|
|
||||||
|
Diff2Html.getPrettyHtmlFromDiff(exInput);
|
||||||
|
|
||||||
|
> Intermediate Json From Git Word Diff Output
|
||||||
|
|
||||||
|
Diff2Html.getJsonFromDiff(exInput);
|
||||||
|
|
||||||
|
> Pretty Html From Json
|
||||||
|
|
||||||
|
Diff2Html.getPrettyHtmlFromJson(exInput);
|
||||||
|
|
||||||
> Check out the `template.html` for a complete example.
|
> Check out the `template.html` for a complete example.
|
||||||
|
|
||||||
## Contribution
|
## Contributions
|
||||||
|
|
||||||
All the contributions are welcome.
|
All the contributions are welcome.
|
||||||
|
|
||||||
|
|
@ -35,4 +42,8 @@ To contribute just send a pull request with your feature,fix,... and it will be
|
||||||
|
|
||||||
Copyright 2014 Rodrigo Fernandes. Released under the terms of the MIT license.
|
Copyright 2014 Rodrigo Fernandes. Released under the terms of the MIT license.
|
||||||
|
|
||||||
|
## Thanks
|
||||||
|
|
||||||
|
This project is inspired in [pretty-diff](https://github.com/scottgonzalez/pretty-diff) by [Scott González](https://github.com/scottgonzalez).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue