Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix [class*=foo] with HTML extractor #1133

Merged
merged 2 commits into from Feb 3, 2024
Merged

Conversation

Gaelan
Copy link
Contributor

@Gaelan Gaelan commented Jul 10, 2023

Proposed changes

Previously, the values of the id and class attributes were stored only as ids and classes respectively, which meant selectors like [class*=foo] were spuriously removed because "foo" is only treated as a class value, not an attribute value. This PR fixes that by unconditionally adding attributes to the generic attribute list, then also adding them to the id/class lists if appropriate.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Lint and unit tests pass locally with my changes
    • Some unrelated tests are failing with include errors - I suspect I've done something wrong with Lerna on my machine and it's unrelated, but let's see what CI says.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
    • N/A

Previously, the values of the id and class attributes were stored
only as ids and classes respsectively, which meant selectors like
[class*=foo] were spuriously removed because "foo" is only treated
as a class value, not an attribute value.
Copy link

github-actions bot commented Jan 7, 2024

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jan 7, 2024
@Gaelan
Copy link
Contributor Author

Gaelan commented Jan 7, 2024

Still would be great to have this merged!

@github-actions github-actions bot removed the Stale label Jan 8, 2024
test that classes and ids are correctly added in attributes names and values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants