update:优化新版个人训练

This commit is contained in:
2026-07-23 14:38:45 +08:00
parent c0d061d7d5
commit ef499e1448
6 changed files with 293 additions and 25 deletions
+2 -1
View File
@@ -400,7 +400,8 @@ function main() {
throw new Error(`未知参数:${unknownArgs.join(", ")}`);
}
const source = readFileSync(sourcePath, "utf8");
// 统一换行符,避免 Windows 的 CRLF 让未变更的协议产生不同哈希。
const source = readFileSync(sourcePath, "utf8").replace(/\r\n?/g, "\n");
const { generatedBlock, messageCount, fieldCount } = createGeneratedSource(source);
const runtimeSource = readFileSync(runtimePath, "utf8");
const startIndex = runtimeSource.indexOf(generatedStartMarker);