This commit is contained in:
Henry Jameson 2026-03-06 15:25:30 +02:00
commit 18a3bbbd49
15 changed files with 43 additions and 36 deletions

View file

@ -23,7 +23,9 @@ export const getAttrs = (tag, filter) => {
.replace(/\/?$/, '')
.trim()
const attrs = Array.from(
innertag.matchAll(/([a-z]+[a-z0-9-]*)(?:=((?:"(?:\\.|[^"\\])*")|(?:'(?:\\.|[^'\\])*')))?/gi),
innertag.matchAll(
/([a-z]+[a-z0-9-]*)(?:=((?:"(?:\\.|[^"\\])*")|(?:'(?:\\.|[^'\\])*')))?/gi,
),
)
.map(([, key, value]) => [key, value])
.map(([k, v]) => {