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

Omit entries w/o URLs and external links from TOC #309

Merged
merged 3 commits into from Sep 17, 2019
Merged

Conversation

SamLau95
Copy link
Collaborator

@SamLau95 SamLau95 commented Sep 8, 2019

When building next/previous page entries, we want to ignore entries that
don't have a URL.

Our previous code only ignored chapters (top-level TOC entries) that
didn't have a URL but (sub)sections without URLs would still get
processed. This commit leaves (sub)sections out when processing the TOC.

We also ignore external links when processing the TOC since it's jarring
to accidentally press the <Left> arrow key and go to a completely
different website.

When building next/previous page entries, we want to ignore entries that
don't have a URL.

Our previous code only ignored chapters (top-level TOC entries) that
didn't have a URL but (sub)sections without URLs would still get
processed. This commit leaves (sub)sections out when processing the TOC.

We also ignore external links when processing the TOC since it's jarring
to accidentally press the `<Left>` arrow key and go to a completely
different website.
@choldgraf
Copy link
Member

Hey @SamLau95 - this looks good to me, though I just restarted the CircleCI build now that their bug was fixed and it seems there's an error in the tests, wanna investigate?

@choldgraf
Copy link
Member

I figured out the reason this test was failing and fixed it! Merging if tests are happy

@choldgraf choldgraf merged commit e6a075c into master Sep 17, 2019
@choldgraf choldgraf deleted the util-toc branch September 17, 2019 19:27
@SamLau95
Copy link
Collaborator Author

Thanks for fixing! I'm on vacation with family now so I appreciate it.

@choldgraf
Copy link
Member

We can trade off vacations in that case, I just got back from one :-)

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