Skip to content

Commit 5b1b2f9

Browse files
committed
Update README
1 parent d772a06 commit 5b1b2f9

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ $ npm install html-differ -g
5252
**html-differ.diffHtml**<br>
5353
**@param** *String* - the 1-st ```html-code```<br>
5454
**@param** *String* - the 2-nd ```html-code```<br>
55-
**@returns** *{Array of objects}* - see [here](https://github.com/kpdecker/jsdiff#examples)
55+
**@returns** *{Array of objects}* - see [here](https://github.com/kpdecker/jsdiff#change-objects)
5656

5757
**html-differ.isEqual**<br>
5858
This method has the same parameters as the previous one, but returns ```Boolean```.
@@ -63,12 +63,12 @@ This method has the same parameters as the previous one, but returns ```Boolean`
6363
**@param** *{Object}* - the result of the work of the method ```html-differ.diffHtml```<br>
6464
**@param** *{Object}* - options:<br>
6565
* the number of characters before the diff and after it<br>
66-
(for example, ```charsAroundDiff: 20```, default - ```20```, optional parameter)<br>
66+
(for example, ```charsAroundDiff: 40```, default: ```40```)<br>
6767

6868
**@returns** *{String}* - diffs
6969

7070
**diff-logger.log**<br>
71-
Pretty logging of diffs. Red text should be removed from the first html relative to the second one, green text should be added.<br>
71+
Pretty logging of diffs.<br>
7272
This method has the same parameters as the previous one.
7373

7474
####Example####
@@ -95,9 +95,9 @@ var diff = htmlDiffer.diffHtml(html1, html2);
9595

9696
var isEqual = htmlDiffer.isEqual(html1, html2);
9797

98-
var res = diffLogger.getDiffText(diff, { charsAroundDiff: 20 });
98+
var res = diffLogger.getDiffText(diff, { charsAroundDiff: 40 });
9999

100-
diffLogger.log(diff, { charsAroundDiff: 20 });
100+
diffLogger.log(diff, { charsAroundDiff: 40 });
101101
```
102102

103103
where ```options``` is the ```Object```:
@@ -123,15 +123,14 @@ Options for BEM are predefined:
123123

124124
* ```ignoreWhitespace: true```
125125

126-
* ```charsAroundDiff: 20```
126+
* ```charsAroundDiff: 40```
127127

128128

129129
###As a program###
130130

131131
```bash
132132
$ html-differ --help
133133
Compares two html-files
134-
Red text should be removed from the first html relative to the second one, green text should be added
135134

136135
Usage:
137136
html-differ [OPTIONS] [ARGS]
@@ -152,7 +151,7 @@ Arguments:
152151
```bash
153152
$ bin/html-differ path/to/html1 path/to/html2
154153

155-
$ bin/html-differ --config=path/to/config path/to/html1 path/to/html2 --chars-around-diff=20
154+
$ bin/html-differ --config=path/to/config path/to/html1 path/to/html2 --chars-around-diff=40
156155
```
157156

158157
####Configuration file###

0 commit comments

Comments
 (0)