FIX: Add # to empty hrefs (#43)
This commit is contained in:
parent
58a1400f55
commit
d6b02afbc2
|
@ -154,10 +154,10 @@ export default {
|
|||
const dToc = document.createElement("div");
|
||||
dToc.classList.add("d-toc-main");
|
||||
dToc.innerHTML = `<div class="d-toc-icons">
|
||||
<a href="" class="scroll-to-bottom" title="${I18n.t(
|
||||
<a href="#" class="scroll-to-bottom" title="${I18n.t(
|
||||
themePrefix("post_bottom_tooltip")
|
||||
)}">${iconHTML("downward")}</a>
|
||||
<a href="" class="d-toc-close">${iconHTML("times")}</a></div>`;
|
||||
<a href="#" class="d-toc-close">${iconHTML("times")}</a></div>`;
|
||||
|
||||
const existing = document.querySelector(".d-toc-wrapper .d-toc-main");
|
||||
if (existing) {
|
||||
|
@ -286,7 +286,7 @@ export default {
|
|||
li.classList.add("d-toc-item");
|
||||
li.classList.add(`d-toc-${clonedNode.tagName.toLowerCase()}`);
|
||||
|
||||
li.innerHTML = `<a data-d-toc="${clonedNode.getAttribute("id")}">${
|
||||
li.innerHTML = `<a href="#" data-d-toc="${clonedNode.getAttribute("id")}">${
|
||||
clonedNode.textContent
|
||||
}</a>`;
|
||||
|
||||
|
|
Loading…
Reference in New Issue