diffparser icon indicating copy to clipboard operation
diffparser copied to clipboard

When there are empty lines in the code, the value of DiffLine.Number is inaccurate

Open lucasKone opened this issue 6 years ago • 0 comments

source code ` @@ -3,11 +3,7 @@ const Name = "test"

func Add(x int, y int) int { if x > 3 { return x - y } else { return x + y } return x + y } `

You can see from the results: const Name = "veitch" ---> DiffLine.Number is 3 "func Add(x int, y int) int {" ---> DiffLine.Number is 4,

but the position of "func Add(x int, y int) int {" in the source code is 5

lucasKone avatar Oct 30 '19 03:10 lucasKone