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

Avoid broken links when links are not as expected. #2944

Merged
merged 1 commit into from Jan 7, 2018

Conversation

felixfontein
Copy link
Contributor

When inserting HTML files with the copy_files task, they might use different link schemes. When URL_TYPE is not rel_path, the current code will mangle and destroy links which aren't as it expects.

The PR improves the logic to not mangle such links, but handle them correctly.

@Kwpolska
Copy link
Member

Kwpolska commented Jan 7, 2018

Could you show an example of a situation that would be fixed by this PR?

@felixfontein
Copy link
Contributor Author

On a site with URL_TYPE = "full_path", I put the following HTML in output/test/file.html:

<!DOCTYPE html>
<html lang="en">
<head>
  <link href="style.css" rel="stylesheet" type="text/css">
[...]

(There's a output/test/style.css there.)

The link checker then complains that output/tyle.css is missing.

@Kwpolska
Copy link
Member

Kwpolska commented Jan 7, 2018

Makes sense, merging.

@Kwpolska Kwpolska merged commit 765c912 into master Jan 7, 2018
@Kwpolska Kwpolska deleted the improving-broken-link-check branch January 7, 2018 18:10
@felixfontein
Copy link
Contributor Author

Thanks!

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