Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
谢罪,早知道把前两个typo并在这里了拉取侧边栏目录时,采用的是读html而不是直接从markdown里拉。如果我们有需要在标题中使用latex符号,会导致常见的katex的符号复制问题。因为heading.textContent的逻辑是提取html中所有文本部分,而katex渲染的html会例如
(如果markdown中标题为
### 关于$\gamma$和$\beta$的必要性
)显然,默认逻辑下,显示的是:
这段代码修改了拉取逻辑,跳过了冗余的部分(即$\gamma$ \gamma)部分
修复后,符号显示正常:
ps:上面这篇文章位于 https://blog.loping151.com/blog/2024/%E9%9D%A2%E8%AF%95%E5%A4%8D%E7%9B%98-1/