From 49d3cd086345cbdb378810b39ef7bc028ca3feb5 Mon Sep 17 00:00:00 2001 From: LoneRifle Date: Thu, 17 Apr 2025 20:26:49 +0800 Subject: [PATCH] fix(check-unlocalized-strings): make HTML tag test case-insens (#7892) --- frontend/scripts/check-unlocalized-strings.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/scripts/check-unlocalized-strings.cjs b/frontend/scripts/check-unlocalized-strings.cjs index 16342fb96b..89384d5ee8 100755 --- a/frontend/scripts/check-unlocalized-strings.cjs +++ b/frontend/scripts/check-unlocalized-strings.cjs @@ -275,8 +275,8 @@ function isCommonDevelopmentString(str) { // HTML tags and attributes if ( - /^<[a-z0-9]+>.*<\/[a-z0-9]+>$/.test(str) || - /^<[a-z0-9]+ [^>]+\/>$/.test(str) + /^<[a-z0-9]+(?:\s[^>]*)?>.*<\/[a-z0-9]+>$/i.test(str) || + /^<[a-z0-9]+ [^>]+\/>$/i.test(str) ) { return true; }