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

Add callback for handling internal links #28

Merged
merged 3 commits into from
Oct 27, 2021

Conversation

mihai-wolfpack
Copy link
Contributor

No description provided.

@stevenzeck
Copy link
Contributor

I think this is fine for now. I wanted to see what happens if it can't find the file that matches the URL of the internal link. In that case, it logs an error and the reader simply goes to the first resource of the book.

@mickael-menu
Copy link
Member

Ha, probably something to handle in go() to abort (and return false) if the link.href can't be found in the readingOrder. It's not directly related to this PR though, so not a blocking issue for the review. I guess the same would happen if a table of contents has a broken link.

@mickael-menu
Copy link
Member

mickael-menu commented Oct 22, 2021

@mihai-wolfpack @stevenzeck

I pushed a fix where we lost the HTML anchor in internal links (e.g. chapter01.xhtml#section-a) but I'd like for you to review before I merge this PR. Thanks!

@mihai-wolfpack
Copy link
Contributor Author

@mickael-menu @stevenzeck

Everything looks good to me! 👍

@mickael-menu mickael-menu merged commit 35b3fa2 into readium:develop Oct 27, 2021
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.

EPUB navigator: internal links replace the whole web view context
3 participants