Skip to content

Commit 00453e3

Browse files
committed
Update README
1 parent e4cc602 commit 00453e3

2 files changed

Lines changed: 35 additions & 8 deletions

File tree

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ The following two code samples will be considered to be equivalent:
154154

155155
Makes **html-differ** ignore HTML comments during the comparison (default: `true`).
156156

157+
**REMARK!**<br>
158+
Does not ignore [conditional comments](http://en.wikipedia.org/wiki/Conditional_comment).
159+
160+
157161
**Example**: `true`<br>
158162
The following two code samples will be considered to be equivalent:
159163

@@ -163,10 +167,15 @@ The following two code samples will be considered to be equivalent:
163167
<html>
164168
<head lang="en">
165169
<meta charset="UTF-8">
166-
<title><!-- comments2 --></title>
170+
<!--[if IE]>
171+
<link rel="stylesheet" type="text/css" href="all-ie-only.css" />
172+
<![endif]-->
173+
<!--[if !IE]><!-->
174+
<link href="non-ie.css" rel="stylesheet">
175+
<!--<![endif]-->
167176
</head>
168177
<body>
169-
Text<!-- comments3 -->
178+
Text<!-- comments2 -->
170179
</body>
171180
</html>
172181
```
@@ -177,7 +186,12 @@ Text<!-- comments3 -->
177186
<html>
178187
<head lang="en">
179188
<meta charset="UTF-8">
180-
<title></title>
189+
<!--[if IE]>
190+
<link href="all-ie-only.css" type="text/css" rel="stylesheet"/>
191+
<![endif]-->
192+
<!--[if !IE]><!-->
193+
<link href="non-ie.css" rel="stylesheet">
194+
<!--<![endif]-->
181195
</head>
182196
<body>
183197
Text
@@ -236,7 +250,7 @@ The options will be predefined:
236250
{ name: 'ondblclick', isFunction: true }
237251
],
238252
ignoreWhitespaces: true,
239-
ignoreComments: false,
253+
ignoreComments: true,
240254
ignoreEndTags: false,
241255
ignoreDuplicateAttributes: false
242256
}

README.ru.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ var HtmlDiffer = require('html-differ').HtmlDiffer,
154154

155155
**html-differ** будет игнорировать HTML-комментарии при сравнении (по умолчанию: `true`).
156156

157+
**ПРИМЕЧАНИЕ!**<br>
158+
[Условные комментарии](https://ru.wikipedia.org/wiki/Условный_комментарий) не игнорируются.
159+
157160
**Пример**: `true`<br>
158161
Следующие два HTML будут считаться эквивалентными:
159162

@@ -163,10 +166,15 @@ var HtmlDiffer = require('html-differ').HtmlDiffer,
163166
<html>
164167
<head lang="en">
165168
<meta charset="UTF-8">
166-
<title><!-- comments2 --></title>
169+
<!--[if IE]>
170+
<link rel="stylesheet" type="text/css" href="all-ie-only.css" />
171+
<![endif]-->
172+
<!--[if !IE]><!-->
173+
<link href="non-ie.css" rel="stylesheet">
174+
<!--<![endif]-->
167175
</head>
168176
<body>
169-
Text<!-- comments3 -->
177+
Text<!-- comments2 -->
170178
</body>
171179
</html>
172180
```
@@ -177,7 +185,12 @@ Text<!-- comments3 -->
177185
<html>
178186
<head lang="en">
179187
<meta charset="UTF-8">
180-
<title></title>
188+
<!--[if IE]>
189+
<link href="all-ie-only.css" type="text/css" rel="stylesheet"/>
190+
<![endif]-->
191+
<!--[if !IE]><!-->
192+
<link href="non-ie.css" rel="stylesheet">
193+
<!--<![endif]-->
181194
</head>
182195
<body>
183196
Text
@@ -236,7 +249,7 @@ var HtmlDiffer = require('html-differ').HtmlDiffer,
236249
{ name: 'ondblclick', isFunction: true }
237250
],
238251
ignoreWhitespaces: true,
239-
ignoreComments: false,
252+
ignoreComments: true,
240253
ignoreEndTags: false,
241254
ignoreDuplicateAttributes: false
242255
}

0 commit comments

Comments
 (0)