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
deal with scheme-relative imports of respec in respec2html #358
deal with scheme-relative imports of respec in respec2html #358
Conversation
The way I read this change, it would mean that you could not generate a static html file without access to the net or a local web server. Is that what you intended? |
no, that's not what this does. Some specs (e.g. https://github.com/w3c/mediacapture-depth/blob/gh-pages/index.html ) use a scheme-relative URL (i.e. //www.w3.org/respec) to link to respec so that the draft can be served both from http: and https: URLs without triggering mixed-content warnings. When running respec2html.js on these specs in the local filesystem, the scheme-relative URL is interpreted as file:// and fails. This patch catches and fixes this case. |
I agree that is what this does. But doesn't it have the side effect that if I actually wanted to use file: URLs I could not? |
Actually.... since respec2html will be running on a machine where ReSpec is local, is there a reason to actually retrieve it over the network at all? Could it be loaded from the local repository? |
You could not use a file URL if the file URL you happened to use was file://www.w3.org/Tools/respec/respec-w3c-common (which is unlikely, both because that requires having exactly that directory path, and also because in that case the file would be named with the extension). Re falling back on the local ReSpec repo, I've looked into it and it is indeed possible; I'm not sure I want to go there though, since we can't be sure the local repo is up to date / on the right branch, etc. Maybe as a separate option? |
And in a separate pull request. I will sign off on this one. LGTM within the understood limitations. |
deal with scheme-relative imports of respec in respec2html
No description provided.