Skip to content
New issue

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

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

Already on GitHub? # to your account

Add srcset support #209

Merged
merged 7 commits into from
Nov 30, 2023
Merged

Add srcset support #209

merged 7 commits into from
Nov 30, 2023

Conversation

angelogladding
Copy link
Collaborator

@angelogladding angelogladding commented Oct 17, 2023

  • a source without a descriptor defaults to 1x
  • sources with already seen descriptors are ignored
  • URLs may contain a comma

Closes #169.

- a source without a descriptor defaults to `1x`
- sources with already seen descriptors are ignored
- URLs may contain a comma

Empty alt properties are no longer kept.
Update regular expression and simplify parsing algorithm as a result.
@angelogladding
Copy link
Collaborator Author

The test cases were based upon microformats/microformats2-parsing#7 (comment) and "Elva dressed as a fairy" is widely used https://github.com/search?q=elva+dressed+fairy&type=code

Copy link
Member

@sknebel sknebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@angelogladding angelogladding merged commit cf322c4 into microformats:main Nov 30, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support img srcset
2 participants