Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
naivefun opened this issue Oct 4, 2018 · 2 comments
Closed

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

naivefun opened this issue Oct 4, 2018 · 2 comments

Comments

@naivefun
Copy link

naivefun commented Oct 4, 2018

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
Copy link
Collaborator

nagaozen commented Oct 16, 2018

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

@naivefun
Copy link
Author

@nagaozen actually I just find out it is there already

let slug = token.attrGet('id')
if (slug == null) {

I just need put this extension AFTER attrs 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants