You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you post a long sentence with a Japanese-only title, SLUG will be EMPTY.
When I post a long post with only Japanese title in Diamond's long post, SLUG becomes empty. If the title contains alphanumeric characters, only those are recognized as slug.
Title consisting only of non-alphanumeric strings are now supported by converting them to SHA1 hash codes as slug. With the current specification, if non-alphanumeric text contains partial alphanumeric characters, only those alphanumeric characters will remain when converted to SLUG.
Symptom
If you post a long sentence with a Japanese-only title, SLUG will be EMPTY.
When I post a long post with only Japanese title in Diamond's long post, SLUG becomes empty. If the title contains alphanumeric characters, only those are recognized as slug.
Maybe same problem occur in Chinese, etc.
frontend/src/app/create-long-post-page/create-long-post/create-long-post.component.ts
Line 400 in f797c5d
For Example
`
> const slug = (str) => str.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9 -]/g, "").trim().replace(/\s+/g, "-").replace(/-+/g, "-");
undefined
> console.log(slug("what is this?"));
what-is-this
undefined
> console.log(slug("日本語が入ったらどうなる?"));
undefined
> console.log(slug("ex) 日本語が入ったらどうなる2?"));
ex-2
undefined
> console.log(slug("ex) blogタイトルに日本語が入ったらどうなる2?"));
ex-blog2
undefined
> console.log(slug("ex) blogタイトルに日本語が入ったらどうなる 2?"));
ex-blog-2
undefined
`
The text was updated successfully, but these errors were encountered: