-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Make print page (print.html) links link to anchors on the print page #1738
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
Conversation
39ffbc0 to
e3cca8f
Compare
|
Tested on the following Rust Bookshelf books with the js code here checking broken links also unavailable anchors on With this PR now all the links on the print page are self-contained, no broken links found except for those who are broken originally, or has self-made JavaScript that needs adaptation (ferris.js in Rust Programming Language).
Please review, Will appreciate if this PR can be merged. cc: @ehuss |
713c825 to
a1bf5cb
Compare
|
This was very helpful for me, it would be nice if this could be merged so i didn't have to build HollowMan6's fork myself in order to generate PDFs whose internal links work |
f1ceb69 to
38ecc41
Compare
57db987 to
00d56ab
Compare
|
Hi @ehuss , I've noticed that you added the S-waiting-on-author label to this PR recently, but I can't see any code change requests and even reviews for this PR. Am I missing something and what should I response/clarify? |
ehuss
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a partial review, there are some other things that I'd like to follow up on.
I'm so sorry. I had a partial review that I wrote a long time ago, but never finished and didn't click the submit button. But GitHub displays the review on the conversation page as-if it was submitted (with a little icon that I overlooked), so I thought I had submitted it. |
Done! Thanks for reviewing. Would love to see it get merged in the near future. |
2d8cf8a to
4073892
Compare
095de4a to
35148d2
Compare
c114316 to
7fb9b46
Compare
68a7572 to
f412f1a
Compare
This comment has been minimized.
This comment has been minimized.
67bd110 to
2ef93e9
Compare
This comment has been minimized.
This comment has been minimized.
e472fb2 to
183f3f1
Compare
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Hollow Man <hollowman@opensuse.org>
Let all the anchors id on the print page to have a path id prefix to help locate. e.g. bar/foo.md#abc -> #bar-foo-abc Also append a dummy div to the start of the original page to make sure that original page links without an anchor can also be located. Fix to remove all the `./` in the normalized path id so that for "./foo/bar.html#abc" we still get "#foo-bar-abc" Add support for redirect link anchors in print page so that anchors can also be redirected, also handle URL redirect links on print page Handle all the elements id to add a path prefix, also make path id to all be the lower case Fix for print page footnote links by adding the path id prefix Signed-off-by: Hollow Man <hollowman@opensuse.org>
|
I appreciate your patience here. In #2844 we've taken a different approach to how HTML is processed. As part of that process, I have updated the print page to now have all anchor links. If you'd like, it would be helpful if you can give it a try and let me know how it works for you. |
|
☔ The latest upstream changes (possibly 1c034bd) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Hi @ehuss! Thank you for supporting this and relieving my pain from resolving the conflicts. I tested several books with the I'll close this now and revert my changes back to v0.4.52 for backward compatibility. |
Resolves #1736
Let all the anchors id on the print page to have a path id prefix to
help locate.
e.g. bar/foo.md#abc -> #bar-foo-abc
Also append a dummy div to the start of the original page to make sure
that original page links without an anchor can also be located.
Signed-off-by: Hollow Man hollowman@opensuse.org