txt: add chapter title pattern, closes #2232 (#2233)

This commit is contained in:
Huang Xin
2025-10-15 00:01:23 +08:00
committed by GitHub
parent fd24a5e9ac
commit 6dd0daa597
+2 -1
View File
@@ -115,9 +115,10 @@ export class TxtToEpubConverter {
[
String.raw`第[零〇一二三四五六七八九十0-9][零〇一二三四五六七八九十百千万0-9]*(?:[章卷节回讲篇封本册部话])(?:[::、  \(\)0-9]*[^\n-]{0,24})(?!\S)`,
String.raw`(?:楔子|前言|简介|引言|序言|序章|总论|概论|后记)(?:[:  ][^\n-]{0,24})?(?!\S)`,
String.raw`chapter[\s.]*[0-9]+(?:[:.  ]+[^\n-]{0,50})?(?!\S)`,
].join('|') +
')',
'gu',
'gui',
),
);
chapterRegexps.push(