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

Interpret image renditions in $-annotated attributes #315

Merged
merged 1 commit into from Nov 26, 2019

Conversation

@fluffy-critter
Copy link
Collaborator

fluffy-critter commented Nov 26, 2019

Summary

Interpret $attributes as image renditions (removing the $). Fixes #312

Detailed description

If an attribute name starts with $, treats it the same as href and also strips off the $. In this way we can support image renditions in custom JS libraries in data-attributes.

Also this fixes a subtle bug where <img> tags without a src attribute will crash, useful for supporting e.g. ondemand-loaded images.

Developer/user impact

Test plan

See tests/content/images/attribute renditions.md

Got a site to show off?

@fluffy-critter fluffy-critter merged commit af6d6ff into master Nov 26, 2019
@fluffy-critter fluffy-critter deleted the feature/312-attr-renditions branch Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.