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

Support diacritics in slug #292

Merged
merged 3 commits into from
Sep 21, 2021
Merged

Support diacritics in slug #292

merged 3 commits into from
Sep 21, 2021

Conversation

hopefourie-nyt
Copy link
Contributor

Description of Change

Previously, character with diacritics dissapear in slug. For example, "Öğretmenelere Öneriler" becomes "retmenelere-neriler". Now, with a change to the regex, slugify is able to use it's built in functionality of transforming diacritics to it's non diacritic counterparts ş -> s, ç -> c etc.

  • Edited regex that goes into slugify function
  • Added a test for diacritics in slug

Related Issue

#267

Motivation and Context

Badly written slugs are a big issue for non-english internet and the links are less accessible.

Checklist

  • Ran npm run lint and updated code style accordingly
  • npm run test passes
  • PR has a description and all contributors/stakeholder are noted/cc'ed
  • tests are updated and/or added to cover new code
  • relevant documentation is changed and/or added

Copy link
Member

@afischer afischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! It would be great if we could continue to support the diacritics in the URL as well, but this seems like a good first step

@afischer afischer linked an issue Sep 21, 2021 that may be closed by this pull request
@afischer afischer merged commit 01d34f0 into main Sep 21, 2021
@afischer afischer deleted the ISSUE-267 branch September 21, 2021 21:28
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.

Characters with diacritics are disappearing in slug
2 participants