docute
docute copied to clipboard
Anchor tags don't work
e.g. Go to https://lassjs.github.io/lass/#/ and click on "contributors" link which should jump you down the page to the Contributors section, but instead takes you to 404. I think we should rewrite logic to autojump #foo for ?id=foo support?
hmm, it works fine for me...
I mean the link "contributors" in this screenshot @egoist:
oh, docute only transforms #id to ?id=id when it's written in markdown 😅 you can add a plugin to work around this:
docute.init({
plugins: [
replaceHref
]
})
function replaceHref(ctx) {
ctx.on('content:updated', vm => {
vm.$el.querySelector('a[href="#contributors"]').setAttribute('href', '...')
})
}