fix bug in search-list.sml: when we find a match, we should start 1 idx after the end position of the match
This commit is contained in:
@@ -136,17 +136,12 @@ struct
|
||||
let
|
||||
val searchList =
|
||||
PersistentVector.append (startPos, prevFinalPos, searchList)
|
||||
|
||||
(* we start 1 idx after the final position we found *)
|
||||
val newStart = prevFinalPos + 1
|
||||
in
|
||||
rangeLoop
|
||||
( dfa
|
||||
, bufferPos + 1
|
||||
, buffer
|
||||
, finishIdx
|
||||
, searchList
|
||||
, 0
|
||||
, bufferPos + 1
|
||||
, ~1
|
||||
)
|
||||
(dfa, newStart, buffer, finishIdx, searchList, 0, newStart, ~1)
|
||||
end
|
||||
else
|
||||
(* continue searching for match *)
|
||||
|
||||
Reference in New Issue
Block a user