Skip to content

Commit e21a45f

Browse files
committed
update readme
1 parent 3dfabf7 commit e21a45f

File tree

2 files changed

+50
-10
lines changed

2 files changed

+50
-10
lines changed

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# html-differ [![Build Status](https://travis-ci.org/bem/html-differ.svg)](https://travis-ci.org/bem/html-differ) [![Coverage Status](https://img.shields.io/coveralls/bem/html-differ.svg)](https://coveralls.io/r/bem/html-differ?branch=master) [![Dependency Status](https://david-dm.org/bem/html-differ.svg)](https://david-dm.org/bem/html-differ) [![devDependency Status](https://david-dm.org/bem/html-differ/dev-status.svg)](https://david-dm.org/bem/html-differ#info=devDependencies)
1+
# html-differ
2+
[![Build Status](https://travis-ci.org/markedjs/html-differ.svg)](https://travis-ci.org/markedjs/html-differ)
3+
[![Dependency Status](https://david-dm.org/markedjs/html-differ.svg)](https://david-dm.org/markedjs/html-differ)
4+
[![devDependency Status](https://david-dm.org/markedjs/html-differ/dev-status.svg)](https://david-dm.org/markedjs/html-differ#info=devDependencies)
25

36
Compares two HTML.
47

@@ -14,6 +17,7 @@ Compares two HTML.
1417
- [ignoreComments](#ignorecomments-boolean)
1518
- [ignoreEndTags](#ignoreendtags-boolean)
1619
- [ignoreDuplicateAttributes](#ignoreduplicateattributes-boolean)
20+
- [ignoreSelfClosingSlash](#ignoreSelfClosingSlash-boolean)
1721
- [Presets](#presets)
1822
- [Usage](#usage)
1923
- [Methods](#methods)
@@ -85,7 +89,7 @@ For example, the following two code samples will be considered to be equivalent:
8589
```
8690

8791
**CAUTION!**<br>
88-
**html-differ** does not check the validity of HTML, but compares them using the above shown criteria and specified options (see the list of possible [options](https://github.com/bem/html-differ/tree/master#options)).
92+
**html-differ** does not check the validity of HTML, but compares them using the above shown criteria and specified options (see the list of possible [options](https://github.com/markedjs/html-differ/tree/master#options)).
8993

9094
## Install
9195

@@ -269,9 +273,25 @@ For example, the following two code samples will be considered to be equivalent:
269273
<span id="blah">Text</span>
270274
```
271275

276+
<!-- TOC:display:ignoreSelfClosingSlash -->
277+
##### ignoreSelfClosingSlash: Boolean
278+
279+
Makes **html-differ** ignore tags' self closing slash during the comparison (default: `false`).
280+
281+
**Example**: `true`<br>
282+
For example, the following two code samples will be considered to be equivalent:
283+
284+
```html
285+
<img src="blah.jpg" />
286+
```
287+
288+
```html
289+
<img src="blah.jpg">
290+
```
291+
272292
#### Presets
273293

274-
* [bem](https://github.com/bem/html-differ/blob/master/presets/bem.json) - sets predefined options for [BEM](http://bem.info/).
294+
* [bem](https://github.com/markedjs/html-differ/blob/master/presets/bem.json) - sets predefined options for [BEM](http://bem.info/).
275295

276296

277297
##### Usage
@@ -315,15 +335,15 @@ var logger = require('html-differ/lib/logger');
315335

316336
##### logger.getDiffText
317337

318-
**@param** *{Array of objects}* - the result of the work of the method [htmlDiffer.diffHtml](https://github.com/bem/html-differ/tree/master#htmldifferdiffhtml)<br>
338+
**@param** *{Array of objects}* - the result of the work of the method [htmlDiffer.diffHtml](https://github.com/markedjs/html-differ/tree/master#htmldifferdiffhtml)<br>
319339
**@param** *{Object}* - options:<br>
320340

321341
* **charsAroundDiff: Number** - the number of characters around the diff result between two HTML (default: `40`).
322342

323343
**@returns** *{String}*
324344

325345
##### logger.logDiffText
326-
**@param** *{Array of objects}* - the result of the work of the method [htmlDiffer.diffHtml](https://github.com/bem/html-differ/tree/master#htmldifferdiffhtml)<br>
346+
**@param** *{Array of objects}* - the result of the work of the method [htmlDiffer.diffHtml](https://github.com/markedjs/html-differ/tree/master#htmldifferdiffhtml)<br>
327347
**@param** *{Object}* - options:<br>
328348

329349
* **charsAroundDiff: Number** - the number of characters around the diff result between two HTML (default: `40`).

README.ru.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# html-differ [![Build Status](https://travis-ci.org/bem/html-differ.svg)](https://travis-ci.org/bem/html-differ) [![Coverage Status](https://img.shields.io/coveralls/bem/html-differ.svg)](https://coveralls.io/r/bem/html-differ?branch=master) [![Dependency Status](https://david-dm.org/bem/html-differ.svg)](https://david-dm.org/bem/html-differ) [![devDependency Status](https://david-dm.org/bem/html-differ/dev-status.svg)](https://david-dm.org/bem/html-differ#info=devDependencies)
1+
# html-differ
2+
[![Build Status](https://travis-ci.org/markedjs/html-differ.svg)](https://travis-ci.org/markedjs/html-differ)
3+
[![Dependency Status](https://david-dm.org/markedjs/html-differ.svg)](https://david-dm.org/markedjs/html-differ)
4+
[![devDependency Status](https://david-dm.org/markedjs/html-differ/dev-status.svg)](https://david-dm.org/markedjs/html-differ#info=devDependencies)
25

36
Сравнивает два HTML.
47

@@ -14,6 +17,7 @@
1417
- [ignoreComments](#ignorecomments-boolean)
1518
- [ignoreEndTags](#ignoreendtags-boolean)
1619
- [ignoreDuplicateAttributes](#ignoreduplicateattributes-boolean)
20+
- [ignoreSelfClosingSlash](#ignoreSelfClosingSlash-boolean)
1721
- [Пресеты](#Пресеты)
1822
- [Использование](#Использование)
1923
- [Методы](#Методы)
@@ -85,7 +89,7 @@
8589
```
8690

8791
**ВНИМАНИЕ!**<br>
88-
**html-differ** не проверяет валидность HTML, а сравнивает их по вышеуказанным критериям и заданным опциям (смотрите список возможных [опций](https://github.com/bem/html-differ/blob/master/README.ru.md#%D0%9E%D0%BF%D1%86%D0%B8%D0%B8)).
92+
**html-differ** не проверяет валидность HTML, а сравнивает их по вышеуказанным критериям и заданным опциям (смотрите список возможных [опций](https://github.com/markedjs/html-differ/blob/master/README.ru.md#%D0%9E%D0%BF%D1%86%D0%B8%D0%B8)).
8993

9094
## Установка
9195

@@ -268,9 +272,25 @@ Text
268272
<span id="blah">Text</span>
269273
```
270274

275+
<!-- TOC:display:ignoreSelfClosingSlash -->
276+
##### ignoreSelfClosingSlash: Boolean
277+
278+
**html-differ** игнорировать теги самозакрывающихся тегов во время сравнения (по умолчанию: `false`).
279+
280+
**Пример**: `true`<br>
281+
Следующие два HTML будут считаться эквивалентными:
282+
283+
```html
284+
<img src="blah.jpg" />
285+
```
286+
287+
```html
288+
<img src="blah.jpg">
289+
```
290+
271291
#### Пресеты
272292

273-
* [bem](https://github.com/bem/html-differ/blob/master/presets/bem.json) - уставливает предопределенные опции для [БЭМ](http://ru.bem.info/).
293+
* [bem](https://github.com/markedjs/html-differ/blob/master/presets/bem.json) - уставливает предопределенные опции для [БЭМ](http://ru.bem.info/).
274294

275295

276296
##### Использование
@@ -313,7 +333,7 @@ var logger = require('html-differ/lib/logger');
313333

314334
##### logger.getDiffText
315335

316-
**@param** *{Array of objects}* - результат работы метода [htmlDiffer.diffHtml](https://github.com/bem/html-differ/blob/master/README.ru.md#htmldifferdiffhtml)<br>
336+
**@param** *{Array of objects}* - результат работы метода [htmlDiffer.diffHtml](https://github.com/markedjs/html-differ/blob/master/README.ru.md#htmldifferdiffhtml)<br>
317337
**@param** *{Object}* - опции:<br>
318338

319339
* **charsAroundDiff: Number** - количество символов перед отличием между HTML и после него (по умолчанию: `40`)
@@ -322,7 +342,7 @@ var logger = require('html-differ/lib/logger');
322342

323343
##### logger.logDiffText
324344

325-
**@param** *{Array of objects}* - результат работы метода [htmlDiffer.diffHtml](https://github.com/bem/html-differ/blob/master/README.ru.md#htmldifferdiffhtml)<br>
345+
**@param** *{Array of objects}* - результат работы метода [htmlDiffer.diffHtml](https://github.com/markedjs/html-differ/blob/master/README.ru.md#htmldifferdiffhtml)<br>
326346
**@param** *{Object}* - опции:<br>
327347

328348
* **charsAroundDiff: Number** - количество символов перед отличием между HTML и после него (по умолчанию: `40`)

0 commit comments

Comments
 (0)