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

deal with scheme-relative imports of respec in respec2html #358

Merged
merged 1 commit into from Nov 10, 2014

Conversation

dontcallmedom
Copy link
Member

No description provided.

@halindrome
Copy link
Contributor

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?

@dontcallmedom
Copy link
Member Author

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.

@halindrome
Copy link
Contributor

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?

@halindrome
Copy link
Contributor

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?

@dontcallmedom
Copy link
Member Author

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?

@halindrome
Copy link
Contributor

And in a separate pull request. I will sign off on this one. LGTM within the understood limitations.

halindrome added a commit that referenced this pull request Nov 10, 2014
deal with scheme-relative imports of respec in respec2html
@halindrome halindrome merged commit aad069b into w3c:develop Nov 10, 2014
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this pull request Feb 19, 2018
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this pull request Feb 19, 2018
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this pull request Feb 19, 2018
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this pull request Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants