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

Use existing id as slug if present #22

Merged
merged 1 commit into from
Feb 4, 2017

Conversation

mjackson
Copy link
Contributor

Instead of always generating a slug, use an existing one if the token already has an "id" attribute.

This allows users to use slugs by setting the id of the token with something like markdown-it-attrs.

Instead of always generating a slug, use an existing one if the token
already has an "id" attribute.
@valeriangalliat
Copy link
Owner

Very nice, thanks a lot!

@valeriangalliat valeriangalliat merged commit 2ca61d0 into valeriangalliat:master Feb 4, 2017
@valeriangalliat
Copy link
Owner

valeriangalliat commented Feb 4, 2017

Published as of 2.7.0

@valeriangalliat
Copy link
Owner

Actually as of 3.0.0 since it was a breaking change for older markdown-it versions (#24)

@mjackson mjackson deleted the use-existing-id branch February 15, 2017 15:15
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

Successfully merging this pull request may close these issues.

2 participants