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

[BUG] toc 在页面包含大量 H4 以下标题时无法对齐,且滚动时会发生数组index溢出 #305

Closed
ghost opened this issue Mar 11, 2023 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ghost
Copy link

ghost commented Mar 11, 2023

Describe the bug 描述你遇到的错误

toc 在页面包含大量 H4 以下标题时,无法对齐,且滚动时会发生数组index溢出
theme.min.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'classList')

Expected behavior 期待的行为

由于 toc 只支持H3以上标题,所以希望滚动时忽略H4以下的标题

Screenshots 屏幕截图

image
image

Build Environment 构建环境

No response

Preview Environment 预览环境

No response

Additional Information 补充信息

No response

@ghost ghost added the bug Something isn't working label Mar 11, 2023
@ghost ghost changed the title [BUG] toc 在页面包含大量 H4 以下标题时无法对齐,且滚动时会发生数组溢出 [BUG] toc 在页面包含大量 H4 以下标题时无法对齐,且滚动时会发生数组index溢出 Mar 11, 2023
@Lruihao Lruihao self-assigned this Mar 11, 2023
@Lruihao Lruihao added this to the v0.2.18 milestone Mar 11, 2023
@Lruihao Lruihao modified the milestones: v0.2.18, v1.0.0 Mar 29, 2023
@Lruihao
Copy link
Member

Lruihao commented Nov 26, 2023

已修复可能的报错,或者修改 markup 配置

[tableOfContents]
  startLevel = 2
  endLevel = 6

@Lruihao Lruihao modified the milestones: v1.0.0, v0.2.18-lts Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant