-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hakyll.Web.Html: fix processing of
srcset
attribute (#891)
We used to assume that `srcset` is just like `src`, and contains only one URL. As the name of the attribute might suggest, this assumption is wrong. The attribute's value has a somewhat-complex grammar, with optional fields and different separators, so I implemented a Parsec parser for (the most of) it. The parser expects URLs to be a contiguous string of anything but space or comma (`srcset`'s separators); I hope it will be sufficient. This also adds tests for the affected functions, and documentation for `getUrls`. Fixes #889.
- Loading branch information
Showing
4 changed files
with
137 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters