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 for multibyte characters #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ngmy
Copy link

@ngmy ngmy commented Dec 21, 2022

I am using mpociot/laravel-apidoc-generator, and I encountered an event that when I write Japanese comments in @group or method comments, all URL hashes in the generated documentation disappear.

The cause is the following line in the slugify function.

.replace(/[^\w\-]+/g, '') // Remove all non-word char

In the Japanese-speaking world, it is more natural not to do any other replace, so I would like to simply return the text.
I don't know about other multi-language areas, but I think it's better than disappearing.

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.

1 participant