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

fix js toc error #271

Merged
merged 1 commit into from
Sep 10, 2020
Merged

fix js toc error #271

merged 1 commit into from
Sep 10, 2020

Conversation

yhliyr
Copy link
Contributor

@yhliyr yhliyr commented May 11, 2020

fix let ancestor = $toclink[activeTocIndex].parentNode; Uncaught TypeError: Cannot read property 'parentNode' of undefined error

const $toclink = $('.toc-link');
only support h1 h2 h3 in markdown syntax, but const $headerlink = $('.headerlink'); can support h4 h5 ...
if .md file contains h4 h5 headers ... $toclink[activeTocIndex] activeTocIndex out of range, equals null

@olOwOlo olOwOlo merged commit 708de67 into olOwOlo:master Sep 10, 2020
@olOwOlo
Copy link
Owner

olOwOlo commented Sep 10, 2020

Thank you for your pull request.

tac0x2a pushed a commit to tac0x2a/hugo-theme-even that referenced this pull request Aug 24, 2021
daymade pushed a commit to daymade/hugo-theme-even that referenced this pull request Sep 30, 2023
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