diff options
author | Brian 'Redbeard' Harrington <redbeard@dead-city.org> | 2021-12-07 17:42:55 -0800 |
---|---|---|
committer | Brian 'Redbeard' Harrington <redbeard@dead-city.org> | 2021-12-07 18:09:01 -0800 |
commit | d978354e88e7709275b2f2a06d9b0b05c7802c8e (patch) | |
tree | d9f8ebb2718a47aa289f56e6653cfc9ce53c8a62 /src/htslib.c | |
parent | ce0f63d0b223cfbd894efd9f931aa880c22a3199 (diff) |
feature: Support data-src and data-srcset for img
Increasingly HTML5 sites use a number of mechanisms for responsive
image loading. Many of these mechanisms revolve around the use of
`data-src` and `data-srcset` attributes within an img tag to provide a
list of valid images to display, along with their relevant sizes (e.g.
https://github.com/aFarkas/lazysizes, https://github.com/malchata/yall.js
).
This change adds the two previously mentioned tags to the list in
`hts_detect[]`, resulting in httrack detecting them correctly.
Initially an attempt was made at using `hts_detectbeg[]` with the
potential of resolving #203. Unfortunately it became apparent that the
implementation of `hts_detectbeg[]` only supports a suffix of integers
(see `src/htstools.h#rech_tageqbegdigits` for more information).
Diffstat (limited to 'src/htslib.c')
-rw-r--r-- | src/htslib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/htslib.c b/src/htslib.c index 92c7d44..b5df95b 100644 --- a/src/htslib.c +++ b/src/htslib.c @@ -115,6 +115,8 @@ const char *hts_detect[] = { "archive", "background", "data", // OBJECT + "data-src", + "data-srcset", "dynsrc", "lowsrc", "profile", // element META |