Skip to content

Commit a071fc5

Browse files
committed
updated diffnet.go
1 parent 3692234 commit a071fc5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

diffnet.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ func diffnet(scanner *bufio.Scanner) {
7878
for scanner.Scan() {
7979
line := scanner.Text()
8080
lineNum++
81+
82+
// Skip header lines (---, +++, @@)
83+
if strings.HasPrefix(line, "---") || strings.HasPrefix(line, "+++") || strings.HasPrefix(line, "@@") {
84+
continue
85+
}
86+
8187
if addPrefix == "" && strings.HasPrefix(line, "+") {
8288
addPrefix = "+"
8389
}

0 commit comments

Comments
 (0)