fix #17615(runnableExamples silently ignored if placed after some code) (#17619)

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
This commit is contained in:
flywind
2021-04-03 09:26:30 +08:00
committed by GitHub
parent e35946f306
commit a807233aeb
8 changed files with 41 additions and 28 deletions

View File

@@ -288,9 +288,9 @@ proc diffInt*(arrayA, arrayB: openArray[int]): seq[Item] =
var dataB = newDiffData(@arrayB, arrayB.len)
let max = dataA.len + dataB.len + 1
## vector for the (0,0) to (x,y) search
# vector for the (0,0) to (x,y) search
var downVector = newSeq[int](2 * max + 2)
## vector for the (u,v) to (N,M) search
# vector for the (u,v) to (N,M) search
var upVector = newSeq[int](2 * max + 2)
lcs(dataA, 0, dataA.len, dataB, 0, dataB.len, downVector, upVector)
@@ -321,9 +321,9 @@ proc diffText*(textA, textB: string): seq[Item] =
h.clear # free up hashtable memory (maybe)
let max = dataA.len + dataB.len + 1
## vector for the (0,0) to (x,y) search
# vector for the (0,0) to (x,y) search
var downVector = newSeq[int](2 * max + 2)
## vector for the (u,v) to (N,M) search
# vector for the (u,v) to (N,M) search
var upVector = newSeq[int](2 * max + 2)
lcs(dataA, 0, dataA.len, dataB, 0, dataB.len, downVector, upVector)