JS: Expand attribute regex to include some Vue attributes

This commit is contained in:
Asger F
2024-10-29 11:16:47 +01:00
parent 560b3da851
commit 3cc6b11e6b
2 changed files with 5 additions and 1 deletions

View File

@@ -184,8 +184,9 @@ public class HTMLExtractor implements IExtractor {
private static final Pattern ANGULAR_FOR_LOOP_DECL =
Pattern.compile("^ *let +(\\w+) +of(?: +|(?!\\w))(.*)");
/** Attribute names that look valid in HTML or in one of the template languages we support, like Vue and Angular. */
private static final Pattern VALID_ATTRIBUTE_NAME =
Pattern.compile("\\*?\\[?\\(?[\\w:_\\-]+\\]?\\)?");
Pattern.compile("[*:@]?\\[?\\(?[\\w:_\\-.]+\\]?\\)?");
/** List of HTML attributes whose value is interpreted as JavaScript. */
private static final Pattern JS_ATTRIBUTE =