fix(parser/diff): newline after strings
This commit is contained in:
parent
985e9c43a2
commit
815cf6506e
|
@ -1 +1 @@
|
|||
Subproject commit 73e4be7cf69513990f13a28d3a4df94cae2669db
|
||||
Subproject commit 6a6b1f781ee2673960d8e6bd0085257846ccdf83
|
|
@ -45,6 +45,12 @@ type pair struct{ x, y int }
|
|||
// to wait longer (to be patient) for the diff, meaning that it is a slower algorithm,
|
||||
// when in fact the algorithm is faster than the standard one.
|
||||
func patienceDiff(old, new string, compareSpace bool) string {
|
||||
if len(old) != 0 && old[len(old)-1] != '\n' {
|
||||
old += "\n"
|
||||
}
|
||||
if len(new) != 0 && new[len(new)-1] != '\n' {
|
||||
new += "\n"
|
||||
}
|
||||
x := strings.SplitAfter(old, "\n")
|
||||
y := strings.SplitAfter(new, "\n")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user