Files
subcast/tsconfig.json
向阳乔木 fc815ab828 Clip subtitles: break at words, pair bilingual lines by meaning, Netflix punctuation
- 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>
2026-11-26 17:42:03 -08:00

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" }]
}