Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m8s

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-01-12 14:47:50 +07:00
commit 95769adf87

View file

@ -22,19 +22,8 @@ const { date2Thai, messageError } = useCounterMixin();
function removeDuplicateWords(text: string): string {
if (!text) return text;
//
const words = text.split(/(?=[ก-๙])/);
const result: string[] = [];
for (let i = 0; i < words.length; i++) {
const word = words[i];
if (i === 0 || word !== words[i - 1]) {
result.push(word);
}
}
// : regex
return text.replace(/([ก-๙]+)\1+/g, "$1");
return text.replace(/([ก-๙]{2,})\1+/g, "$1");
}
/** รับ props มาจากหน้าหลัก */