Skip to content

fix: HTML attributes under SKIP_TAGS subtrees never reach attr_values #104

Open

Description

@mgiovani

The HTML walk in src/prose.rs (SKIP_TAGS, the !has_tag(SKIP_TAGS, tag) guard) drops whole subtrees of svg, pre, code, textarea and template. That is right for the prose stream, but the same guard also hides their attributes and <style> children from attr_values and from the StyleDoc the design group reads.

Repro (with --select design): <svg class="text-indigo-600"> and <svg><path class="fill-violet-500"/></svg> produce no violet-accent finding, while the same class on a <div> does. A <style> inside <template> is skipped too.

Fix direction: keep skipping these subtrees for text, but still collect class/style attributes and <style> bodies from them. Add an html fixture line under an <svg>.

Found reviewing PR #103.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions