Skip to content

Commit 0ec41f1

Browse files
author
mosugi
committed
feat: support for normalize japanese hiragana and katakana title
1 parent d531d12 commit 0ec41f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/notion-utils/src/normalize-title.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const normalizeTitle = (title?: string | null): string => {
22
return (title || '')
33
.replace(/ /g, '-')
4-
.replace(/[^a-zA-Z0-9-\u4e00-\u9fa5]/g, '')
4+
.replace(/[^a-zA-Z0-9-\u4e00-\u9fa5\u3041-\u3096\u30A1-\u30FA]/g, '')
55
.replace(/--/g, '-')
66
.replace(/-$/, '')
77
.replace(/^-/, '')

0 commit comments

Comments
 (0)