From 9b1c267cf1bde82ef74085e9da7b7971f0d76960 Mon Sep 17 00:00:00 2001 From: Mikhail Bodrov Date: Sat, 9 Sep 2023 15:19:49 +0300 Subject: [PATCH] Use startsWith instead of regexp --- src/htmlparser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/htmlparser.js b/src/htmlparser.js index f31c2bb..9105781 100644 --- a/src/htmlparser.js +++ b/src/htmlparser.js @@ -136,7 +136,7 @@ export class HTMLParser { let textEnd = html.indexOf('<'); if (textEnd === 0) { // Comment: - if (/^'); if (commentEnd >= 0) { @@ -150,7 +150,7 @@ export class HTMLParser { } // https://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment - if (/^'); if (conditionalEnd >= 0) {