From fb002e361e63fb7c4f33bcf283e9eecbacc390db Mon Sep 17 00:00:00 2001 From: Xuanru Li <157947275+xuanruli@users.noreply.github.com> Date: Sun, 26 Jul 2026 03:58:27 -0700 Subject: [PATCH] fix(lint): back readAttr with the HTML parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `readAttr` matched only quoted attribute values. Unquoted values are valid HTML5 and the runtime honours them, so on a root written `data-composition-id=main data-start=0 data-width=1920 data-height=1080` the linter reported two errors for attributes that are present, while a file with genuinely overlapping unquoted clips and no `class="clip"` linted clean. The same rule set printed the composition id in its own message, because `readDecodedAttr` — the htmlparser2-backed reader twenty lines below — parsed that tag correctly, which isolated the defect to the regex. Widening the regex with an unquoted alternative is worse, not better: it has no notion of attribute-list position, so it captures `name=value` pairs out of other attributes' quoted values. Measured on that version, two `