w3c / spec-prod

GitHub Action to build ReSpec/Bikeshed specs, validate output and publish to GitHub pages or W3C
https://w3c.github.io/spec-prod/
MIT License
34 stars 21 forks source link

echida/spec-prod does not pick up an svg file when referred to via an <object> #97

Closed iherman closed 3 years ago

iherman commented 3 years ago

Consider the editor's draft of our document, which is within the epub spec repo. The spec consists of a respec file, referring to an svg and a png file.

Spec-prod is activated via a dedicated action whose (error) results are here. Note that the following lines:

$ tar cvf /tmp/echidna.tar *
    Overview.html
    images/
    images/epub.png

suggest that spec-prod did pick up the png file and did not pick up the svg file as shown in line 165.

I suspect the bug is the following. The html snippet for referring to the svg file is:

<figure>
    <figcaption>...</figcaption>
    <object data="images/epub.svg" width="600">
        <img src="images/epub.png" width="600" alt="..." />
    </object>
</figure>

i.e., the svg file is referred via a data attribute rather than an src, and the former is not picked up by the process.


In the old days, we had an ECHIDNA file in the directory listing all necessary files. The message I got was that the ECHIDNA file should not be used anymore; but maybe that is the situation when we should. If indeed the ECHIDNA file is required, does it mean that the action yml file should say, at line 21

SOURCE: epub33/overview/ECHIDNA

cc @sidvishnoi @tidoust @mattgarrish

sidvishnoi commented 3 years ago

This would require a little addition to the subresources package (https://github.com/sidvishnoi/subresources) which is used to get all sorts of sub-resources from a page. Svg object image (and probably a few others) is something I missed there, as it's rarely used. I'll try to fix it this week.

Note that Echidna file is not supported by spec-prod at all, nor is there some intention to support it.

iherman commented 3 years ago

Note that Echidna file is not supported by spec-prod at all, nor is there some intention to support it.

Understood.

Svg object image (and probably a few others) is something I missed there, as it's rarely used. I'll try to fix it this week.

Thanks!

sidvishnoi commented 3 years ago

🛠️ Fixed in https://github.com/sidvishnoi/subresources/commit/54284b8deb9fdef64b643ebe9fe999d1f9bc169e and https://github.com/w3c/spec-prod/commit/9bf963ea309eb80abb9e9f9c2734ea63cbbf8fa4. 🚀 Released in v2 ≡ v2.4.2