diff --git a/.build/check-markup-classes.ts b/.build/check-markup-classes.ts index c21605b4e..934764c16 100644 --- a/.build/check-markup-classes.ts +++ b/.build/check-markup-classes.ts @@ -30,7 +30,7 @@ const CLASS_SELECTOR = new RegExp(String.raw`\.(-?(?:${ESCAPE}|[_a-zA-Z\u00a0-\u const decodeIdent = (ident: string): string => ident.replace(/\\([0-9a-fA-F]{1,6})[ \t\r\n\f]?|\\(.)/g, (_, hex: string | undefined, char: string | undefined) => (hex === undefined ? char! : String.fromCodePoint(parseInt(hex, 16)))) -const classNamesIn = (css: string): string[] => [...css.matchAll(CLASS_SELECTOR)].map((m) => decodeIdent(m[1]!)) +const classNamesIn = (css: string): string[] => [...css.matchAll(CLASS_SELECTOR)].map((m) => decodeIdent(m[1])) const args = process.argv.slice(2) const htmlTargets: string[] = [] @@ -84,7 +84,7 @@ const main = async () => { pageCount++ // Page-level