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

Headers with special characters between words should be converted to "-" #67

Closed
LeonnardoVerol opened this issue Apr 10, 2020 · 1 comment

Comments

@LeonnardoVerol
Copy link

Bug report

When creating headers with special characters between words, is it expected that the special character will be changed to "-"

Steps to reproduce

Create duplicated Headers (same name) inside a markdown file

# header & header

What is expected?

The anchor link for the header should be:

#header--header

What is actually happening?

It is generating the following anchor links:

#header-header
@nagaozen
Copy link
Collaborator

This library is "slugification" agnostic. id est we don't decide what is the right or wrong way to make your links prettier. The default behavior is to just take the header content and encodeURIComponent it. That said, in the early days we leveraged the slugify library and it's expected output for your input is header-and-header, but we don't expect it as a dependency anymore.

Developers are free to decide what strategy is better for'em because they know more their application use cases than us. So, just pass a slugify function that tastes good for you.

Have a nice day.

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