You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
## The comparison algorithm
6
6
7
-
`HTML` codes are compared as**browsers** do, to be more exact `html-differ` compares `HTML` codes using the following criteria:
7
+
`HTML` codes will be considered to be equivalent if they are equivalent for**browsers**, to be more exact `html-differ` compares `HTML` codes using the following criteria:
8
8
9
9
* Two respective lists of attributes are considered to be equivalent even if they are specified in different order.
Copy file name to clipboardExpand all lines: README.ru.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
## Алгоритм сравнения
6
6
7
-
`HTML`коды сравниваются так, как это делают **браузеры**, то есть `html-differ` сравнивает `HTML`-коды по следующим критериям:
7
+
`HTML`-коды будут считаться эквивалентыми, если они эквивалентны для **браузеров**, то есть `html-differ` сравнивает `HTML`-коды по следующим критериям:
8
8
9
9
* Два соответствующих списка атрибутов считаются эквивалентными, даже если они записаны в разном порядке.
10
10
@@ -35,14 +35,14 @@
35
35
Например, cледующие два кода будут считаться эквивалентными:
36
36
37
37
```html
38
-
<spanclass="ab bc cd">Text</span>
38
+
<spanid="blah"id="ololo">Text</span>
39
39
```
40
40
41
41
```html
42
-
<spanclass=" cd ab bc">Text</span>
42
+
<spanid="blah">Text</span>
43
43
```
44
44
45
-
* Закрывающие тэги не сравниваются
45
+
* Закрывающие тэги не сравниваются.
46
46
47
47
Например, cледующие два кода будут считаться эквивалентными:
48
48
@@ -54,7 +54,7 @@
54
54
<span>Text</spane>
55
55
```
56
56
57
-
**ВНИМАНИЕ!**`html-differ` не проверяет валидность `HTML`-кодов, а сравнивает их по выше описанным критериям и задынным опциям (смотрите список возможных опций в [использовании](https://github.com/bem/html-differ/blob/master/README.ru.md#%D0%98%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5)).
57
+
**ВНИМАНИЕ!**`html-differ` не проверяет валидность `HTML`-кодов, а сравнивает их по вышеуказанным критериям и задынным опциям (смотрите список возможных опций в [использовании](https://github.com/bem/html-differ/blob/master/README.ru.md#%D0%98%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5)).
**ВНИМАНИЕ!** Если указать значение `bem` опции как `true`, то другие объявления опций `ignoreHtmlAttrs` и `compareHtmlAttrsAsJSON` будут проигнорированы.
0 commit comments