nuxt-modules / html-validator

HTML validation for Nuxt
https://html-validator.nuxtjs.org
MIT License
197 stars 22 forks source link

fix(validator): account for empty Vue scoped style attributes #479

Closed dargmuesli closed 6 months ago

dargmuesli commented 6 months ago

In an svg tag I have many data-v-... attributes with an empty value ="". These are currently replaced by this module's regex incorrectly.

What's currently detected:

image

What this PR changes:

image

Disclaimer: Maybe there shouldn't even be data-v-... attributes with their value set to ="". I see other data-v-... attributes with no suffix at all. The existing regex let's me think that the actual bug might be some tooling in my project which incorrectly allows data-v-... attributes to have ="", but which it shouldn't. Do you have any insight into this @danielroe?

netlify[bot] commented 6 months ago

Deploy Preview for html-validator canceled.

Name Link
Latest commit 0d1bae1ac2378945b943b1957c36fc5ca91db7e1
Latest deploy log https://app.netlify.com/sites/html-validator/deploys/662072a95f93bc0008506391
codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.65%. Comparing base (17a891c) to head (0d1bae1). Report is 10 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #479 +/- ## ========================================== + Coverage 78.99% 81.65% +2.66% ========================================== Files 4 4 Lines 219 229 +10 Branches 46 39 -7 ========================================== + Hits 173 187 +14 + Misses 46 42 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.