Skip to content

Commit

Permalink
Merge pull request #126 from hirasso/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
valeriangalliat committed Jun 2, 2023
2 parents 649582d + 388028d commit 69cbf72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ const root = parse(html)
for (const h of root.querySelectorAll('h1, h2, h3, h4, h5, h6')) {
const slug = h.getAttribute('id') || slugify(h.textContent)
h.setAttribute('id', slug)
h.innerHTML = `<a href="#${slug}>${h.innerHTML}</a>`
h.innerHTML = `<a href="#${slug}">${h.innerHTML}</a>`
}

console.log(root.toString())
Expand Down

0 comments on commit 69cbf72

Please sign in to comment.