mirror of
https://github.com/joeseesun/subcast.git
synced 2026-12-01 23:30:15 +08:00
- subtitleText.ts (pure, tested with node): tidyLine drops punctuation at a line's start, ends lines only on ?!, turns ,。 inside a Chinese line into a space and drops unpaired quotes; splitCjk breaks only between words (Intl.Segmenter), preferring punctuation, never before a particle or 里, after a preposition, or between a numeral and its measure word. - Bilingual cues no longer split the translation by length: the model splits both languages together (kept only when both stay whole), else sentence pairs, else the whole segment wraps to two lines; only overlong pairs split by length, the CJK side leading and the other side cut between words in proportion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
639 B
JSON
27 lines
639 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2020",
|
|
"useDefineForClassFields": true,
|
|
"lib": ["ES2020", "ES2022.Intl", "DOM"],
|
|
"module": "ESNext",
|
|
"skipLibCheck": true,
|
|
|
|
/* Bundler mode */
|
|
"moduleResolution": "bundler",
|
|
"allowImportingTsExtensions": true,
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"noEmit": true,
|
|
"jsx": "react-jsx",
|
|
|
|
/* Linting */
|
|
"strict": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noFallthroughCasesInSwitch": true
|
|
},
|
|
"include": ["src"],
|
|
"exclude": ["src/**/*.test.ts"],
|
|
"references": [{ "path": "./tsconfig.node.json" }]
|
|
}
|