Skip to content

Commit b78699b

Browse files
committed
changed patterns for less false positives ✨
1 parent c77006e commit b78699b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

server/src/accessibilityPatterns.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111

1212
// Order based om most common types first
1313
const patterns: string[] = [
14-
"<div(?:.)+?>",
15-
"<span(?:.)+?>",
14+
"<div(>|)(?:.)+?>",
15+
"<span(>|)(?:.)+?>",
1616
// "id=\"(?:.)+?\"",
17-
"<a(?:.)+?>(?:(?:\\s|\\S)+?(?=<\/a>))<\/a>",
18-
"<img(?:.)+?>",
19-
"<input(?:.)+?>",
20-
"<head(?:.|)+?>(?:(?:\\s|\\S|)+?(?=<\/head>))<\/head>",
21-
"<html(?:.)+?>",
17+
"<a (?:.)+?>(?:(?:\\s|\\S)+?(?=<\/a>))<\/a>",
18+
"<img (?:.)+?>",
19+
"<input (?:.)+?>",
20+
"<head (?:.|)+?>(?:(?:\\s|\\S|)+?(?=<\/head>))<\/head>",
21+
"<html(>|)(?:.)+?>",
2222
"tabindex=\"(?:.)+?\"",
23-
"<(?:i|)frame(?:.|)+?>"
23+
"<(?:i|)frame (?:.|)+?>"
2424
];
2525
export const pattern: RegExp = new RegExp(patterns.join('|'), 'ig');
2626

0 commit comments

Comments
 (0)