음성 낭독: 숫자 범위(107~110달러, 3mm~5mm)의 ~를 '에서'로 읽기

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
kimandClaude Sonnet 5.5 committed 2026-10-19 23:48:39 +09:00
1 parent f539291715
commit 29e182780e
1 file changed
+3
+3
View File
@@ -523,6 +523,9 @@
// pause at all — worse than the old paren-as-space bug. Must run after
// all the ^...$/gm passes above (they still need real newlines).
.replace(/(?<![.!?,:;])\n{2,}/g, '. ')
// 범위 표기 "107~110달러", "3밀리미터~5밀리미터": ~는 읽히지 않고 사라져 두 수가 붙어 들렸다(2026-10-19).
// 온도 범위(°C)는 위에서 이미 처리됐다. 숫자(+단위) ~ 숫자는 "에서"로 읽는다.
.replace(/(\d(?:[\d.]*\d)?(?:퍼센트|밀리미터|센티미터|킬로미터|미터|킬로그램|그램|달러|원|도|분|초|시간|명|개|건|배)?)\s*[~∼~]\s*(?=\d)/g, '$1에서 ')
.replace(/(?<![.!?,:;])\n/g, ', ')
.replace(/[\u{1F300}-\u{1FAFF}\u{2600}-\u{27BF}\u{1F1E6}-\u{1F1FF}\u{2190}-\u{21FF}\u{2B00}-\u{2BFF}\u{FE0F}]/gu, '')
// Hour numbers use native-Korean counting, not Sino-Korean — must run