Просмотр исходного кода

添加更多的语尾应该祛除的符号

visuddhinanda 1 год назад
Родитель
Сommit
984a4ee7be
1 измененных файлов с 11 добавлено и 1 удалено
  1. 11 1
      dashboard/src/components/template/Nissaya/NissayaMeaning.tsx

+ 11 - 1
dashboard/src/components/template/Nissaya/NissayaMeaning.tsx

@@ -10,7 +10,17 @@ export interface IMeaning {
 }
 
 export const nissayaBase = (item: string, endings: string[]): IMeaning => {
-  let word = item.trim().replaceAll("။", "");
+  let word = item
+    .trim()
+    .replaceAll("။", "")
+    .replaceAll("[}", "")
+    .replaceAll("]", "")
+    .replaceAll("(", "")
+    .replaceAll(")", "")
+    .replaceAll("၊", "")
+    .replaceAll(",", "")
+    .replaceAll(".", "");
+
   let end: string[] = [];
   for (let loop = 0; loop < 3; loop++) {
     for (let i = 0; i < word.length; i++) {