Skip to content

Preview and Diff functions fail with data-include #4480

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

Closed
jandrieu opened this issue Jul 14, 2023 · 2 comments
Closed

Preview and Diff functions fail with data-include #4480

jandrieu opened this issue Jul 14, 2023 · 2 comments
Labels

Comments

@jandrieu
Copy link

Description of problem

When using data-include, it fails to render in Github previews and diffs.

URL to affected spec or repo:

w3c/vc-use-cases#145

What happened (e.g., it crashed)?:

The rendered html shows errors because the relative URL of the include points to files that don't exist.

Expected behavior (e.g., it shouldn't crash):

The included files should render

Optional, steps to reproduce:

  1. Add a data-include attribute that includes a local file, merge it in.
  2. Verify that the merge is in the current rendering (github.io)
  3. Make a new branch, somewhere.
  4. Change a file. Commit that to the new branch
  5. Make a PR to merge new branch
  6. Click on the preview or diff link in the PR review

You'll note that the data-includes do not get rendered in the preview.

The underlying cause is that the relative URL takes on the base of the preview, which isn't the branch.

I don't know how the preview and diff functions are configured, but it seems that code could set the base using a URL that points to the branch that is being merged in.

Are those preview and diff functions under the ReSpec umbrella or something else?

@jandrieu jandrieu added the bug label Jul 14, 2023
@sidvishnoi
Copy link
Member

@jandrieu This belongs to tobie/pr-preview.

@jandrieu
Copy link
Author

For my own sanity, here's the issue over there. tobie/pr-preview#144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants