Skip to content

Commit

Permalink
🐞 fix: 修复问题 #119
Browse files Browse the repository at this point in the history
  • Loading branch information
白云苍狗 committed Apr 14, 2024
1 parent fa6176a commit ddc83aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/hexo-theme-async-ts/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ export function InitToc() {

if (toc.post_title) {
postToc.querySelectorAll('.trm-toc-link').forEach(item => {
const id = item.getAttribute('href');
const title = utils.q(id);
const id = item.getAttribute('href').replace(/^#/, '');
const title = utils.q(`[id="${id}"]`);
if (!title) return;
const span = document.createElement('span');
span.className = 'trm-toc-icon';
Expand Down

0 comments on commit ddc83aa

Please sign in to comment.