From 6169c2b95d55f780e14579561edcf0a6319d4d20 Mon Sep 17 00:00:00 2001 From: Memo Chou Date: Sun, 5 Mar 2023 14:54:29 +0800 Subject: [PATCH] Update add mark helper --- utils/add-mark.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/add-mark.js b/utils/add-mark.js index ad4561ec..f2451719 100644 --- a/utils/add-mark.js +++ b/utils/add-mark.js @@ -1,9 +1,12 @@ +import config from '../config/index.js'; + const addMark = (text) => { const marks = ['?', '。', '!', '?', '.', '!']; if (marks.some((mark) => text.endsWith(mark))) { return text; } - return `${text}.`; + if (config.APP_LANG === 'zh' || config.APP_LANG === 'ja') return '。'; + return '.'; }; export default addMark;