This commit is contained in:
wdjwxh 2025-12-11 15:54:26 +08:00
parent a6e7dc5e99
commit d519612ded
1 changed files with 8 additions and 6 deletions

14
sync.py
View File

@ -206,12 +206,14 @@ def parse_diff_with_line_numbers(diff_text):
})
elif line.startswith('---') or line.startswith('+++'):
# 文件头信息
parsed_lines.append({
'type': 'header',
'content': line,
'old_line': None,
'new_line': None
})
continue
#parsed_lines.append({
# 'type': 'header',
# 'content': line,
# 'old_line': None,
# 'new_line': None
#})
elif in_hunk:
if line.startswith('-'):
# 删除的行