mirror of
https://github.com/MeiK2333/github-style.git
synced 2025-10-07 01:54:06 +00:00
修复当小标题为链接时,toc生成错误的bug
This commit is contained in:
@@ -30,7 +30,7 @@ function getToc() {
|
||||
const a = document.createElement('a');
|
||||
a.classList.add("filter-item", "SelectMenu-item", "ws-normal", "wb-break-word", "line-clamp-2", "py-1", "toc-item");
|
||||
a.href = `#${h.id}`;
|
||||
a.innerText = h.innerHTML;
|
||||
a.innerText = h.innerText;
|
||||
a.style.paddingLeft = `${size * 12}px`;
|
||||
toc_list.appendChild(a);
|
||||
}
|
||||
|
Reference in New Issue
Block a user