fix: 修复 CRLF 换行文件下 parseTasks 解析失败导致任务进度误判

This commit is contained in:
2026-06-09 22:47:39 +08:00
parent 983a21acb6
commit 7e260291f0

View File

@@ -2,7 +2,7 @@ import type { TaskItem } from "../types.ts";
export function parseTasks(content: string): TaskItem[] {
const tasks: TaskItem[] = [];
const lines = content.split("\n");
const lines = content.split(/\r?\n/);
for (const line of lines) {
const match = line.match(/^[\s]*- \[([ xX])\] (.*)$/);
if (match) {