valeriangalliat / markdown-it-anchor

A markdown-it plugin that adds an `id` attribute to headings and optionally permalinks.
The Unlicense
292 stars 72 forks source link

respect customised id with markdown-it-attrs? #49

Closed naivefun closed 6 years ago

naivefun commented 6 years ago

I'm using markdown-it-attrs and I'd like to assign id to header. But anchor will overwrite the id, is it possible to ignore id slug when an id is already in place?

nagaozen commented 6 years ago

Hum, seems to be right thing to do... Do you have a PR ready?!

naivefun commented 6 years ago

@nagaozen actually I just find out it is there already
https://github.com/valeriangalliat/markdown-it-anchor/blob/1cc288c84ddac11a7047f2adb301b6958929ff19/index.js#L64-L66

I just need put this extension AFTER attrs 😸