Add full width number mapping
This commit is contained in:
parent
cca2769b07
commit
f49d16f8e2
2 changed files with 21 additions and 1 deletions
|
|
@ -211,6 +211,7 @@
|
||||||
"👅": "혀",
|
"👅": "혀",
|
||||||
"👄": "입",
|
"👄": "입",
|
||||||
"🫦": "입술을 깨물다",
|
"🫦": "입술을 깨물다",
|
||||||
|
"🧛♂️": "뱀파이어",
|
||||||
"👶": "아기",
|
"👶": "아기",
|
||||||
"🧒": "어린이",
|
"🧒": "어린이",
|
||||||
"👦": "소년",
|
"👦": "소년",
|
||||||
|
|
@ -1265,7 +1266,7 @@
|
||||||
"⚜": "플뢰르 드 리",
|
"⚜": "플뢰르 드 리",
|
||||||
"🔱": "삼지창 엠블럼",
|
"🔱": "삼지창 엠블럼",
|
||||||
"📛": "이름배지",
|
"📛": "이름배지",
|
||||||
"🔰": "초급을 뜻하는 일본어 기호",
|
"🔰": "초급 기호",
|
||||||
"⭕": "속이 빈 붉은 원",
|
"⭕": "속이 빈 붉은 원",
|
||||||
"✅": "체크 표시 버튼",
|
"✅": "체크 표시 버튼",
|
||||||
"☑": "체크박스가 있는 체크박스",
|
"☑": "체크박스가 있는 체크박스",
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ export function processKorean(input: string): string {
|
||||||
}
|
}
|
||||||
export namespace processKorean {
|
export namespace processKorean {
|
||||||
export const DoubleMixedChoseongMap = {
|
export const DoubleMixedChoseongMap = {
|
||||||
|
ㅇㅃㅅㄹ: "이쁜사랑",
|
||||||
ㅇㅈㄹ: "이지랄",
|
ㅇㅈㄹ: "이지랄",
|
||||||
ㅈㄹㄴ: "지랄노",
|
ㅈㄹㄴ: "지랄노",
|
||||||
ㅎㅇ: "하이",
|
ㅎㅇ: "하이",
|
||||||
|
|
@ -519,9 +520,27 @@ export namespace processIsolatedSymbol {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function processFullWidth(input: string): string {
|
||||||
|
return input.replace(
|
||||||
|
/[1234567890]/g,
|
||||||
|
(i) =>
|
||||||
|
processFullWidth.FullWidthNumberMap[
|
||||||
|
i as keyof typeof processFullWidth.FullWidthNumberMap
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export namespace processFullWidth {
|
||||||
|
// prettier-ignore
|
||||||
|
export const FullWidthNumberMap = {
|
||||||
|
"0": "0", "1": "1", "2": "2", "3": "3", "4": "4",
|
||||||
|
"5": "5", "6": "6", "7": "7", "8": "8", "9": "9",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function saferKorean(input: string): string {
|
export function saferKorean(input: string): string {
|
||||||
return (input.normalize() + " ")
|
return (input.normalize() + " ")
|
||||||
.let((i) => processUnsounds(i))
|
.let((i) => processUnsounds(i))
|
||||||
|
.let((i) => processFullWidth(i))
|
||||||
.let((i) => processIsolatedSymbol(i))
|
.let((i) => processIsolatedSymbol(i))
|
||||||
.let((i) => processMarkdown(i))
|
.let((i) => processMarkdown(i))
|
||||||
.let((i) => processKorean(i))
|
.let((i) => processKorean(i))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue