documentarian icon indicating copy to clipboard operation
documentarian copied to clipboard

Support for multibyte characters

Open ngmy opened this issue 3 years ago • 0 comments

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.

ngmy avatar Dec 21 '22 13:12 ngmy