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
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -369,3 +369,33 @@ Study the following `config.json` file:
369
369
"ignoreDuplicateAttributes":false
370
370
}
371
371
```
372
+
373
+
## Masks
374
+
375
+
**html-differ** supports handling of _masks_ in HTML.
376
+
377
+
For example, the following two code samples will be considered to be equivalent:
378
+
379
+
```html
380
+
<divid="{{[a-z]*\s\d+}}">
381
+
```
382
+
383
+
```html
384
+
<divid="text 12345">
385
+
```
386
+
387
+
### Syntax
388
+
389
+
_Masks_ in **html-differ** have the following syntax:
390
+
391
+
```js
392
+
{{RegExp}}
393
+
```
394
+
395
+
where:
396
+
397
+
*`{{` – opening identifier of the _mask_.
398
+
399
+
*`RegExp` – regular expression for matching with the corresponding value in another HTML. The syntax is similar to regular expressions in JavaScript written in a literal notation.
**html-differ** поддерживает использование _масок_ в HTML.
373
+
374
+
Например, следующие два HTML будут считаться эквивалентными:
375
+
376
+
```html
377
+
<divid="{{[a-z]*\s\d+}}">
378
+
```
379
+
380
+
```html
381
+
<divid="text 12345">
382
+
```
383
+
384
+
### Синтаксис
385
+
386
+
Для записи _масок_ в **html-differ** используется следующий синтаксис:
387
+
388
+
```js
389
+
{{RegExp}}
390
+
```
391
+
392
+
где:
393
+
394
+
*`{{` – открывающий идентификатор _маски_.
395
+
396
+
*`RegExp` – регулярное выражение для сопоставления с соответствующим значением в сравниваемом HTML. Имеет такой же синтаксис как и регулярные выражения в JavaScript, записанные в _literal notation_.
0 commit comments