Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wveitch opened this issue Oct 30, 2019 · 0 comments

Comments

@wveitch
Copy link

wveitch commented Oct 30, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant