use id attribute instead of name for in page anchors and remove redundant anchors (#449)

This commit is contained in:
Ronen Amiel 2018-03-08 00:25:48 +02:00 committed by Joel Marcey
parent 8c2145585c
commit c800870fef
4 changed files with 8 additions and 11 deletions

View file

@ -20,7 +20,7 @@ function anchors(md) {
return (
'<h' +
tokens[idx].hLevel +
'><a class="anchor" aria-hidden="true" name="' +
'><a class="anchor" aria-hidden="true" id="' +
toSlug(textToken.content) +
'"></a><a href="#' +
toSlug(textToken.content) +