From 4232da5ced415c94b826afb391070e0f924c255c Mon Sep 17 00:00:00 2001 From: tamakyi Date: Wed, 9 Sep 2026 15:27:48 +0800 Subject: [PATCH] =?UTF-8?q?git-sync-web=20=E8=87=AA=E5=8A=A8=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=202026-09-09=2015:27:47?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/app.js b/static/app.js index 7d3b9e0..c4d80a8 100644 --- a/static/app.js +++ b/static/app.js @@ -632,6 +632,7 @@ function parseUnifiedDiff(text) { const files = []; let cur = null; let oldNo = 0, newNo = 0; + let inHunk = false; // 词级模式(--word-diff=plain)下 git 的上下文行不带前导空格,需据此兜底 const push = (header) => { cur = { header, rows: [] }; files.push(cur); return cur; }; for (const line of lines) { if (line.startsWith('diff --git') || line.startsWith('Index: ')) { push(line); continue; }