Skip to content

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

Description

@lucasKone

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions