From 977b766e5cbde8f7c4abf9aa89ed0868d900055a Mon Sep 17 00:00:00 2001 From: rsteube Date: Sun, 3 Dec 2023 00:56:26 +0100 Subject: [PATCH] tmp --- tokenslice.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokenslice.go b/tokenslice.go index f0d4aae..00d3ff9 100644 --- a/tokenslice.go +++ b/tokenslice.go @@ -102,8 +102,8 @@ func (t TokenSlice) WordbreakPrefix() string { case QUOTING_STATE, QUOTING_ESCAPING_STATE, ESCAPING_QUOTED_STATE: found = true // TODO add value up to quote to prefix - if index := strings.LastIndexAny(last.RawValue, `"'`); index > -1 { - prefix = last.RawValue[:index] // TODO test - this is wrong + if index := strings.LastIndexAny(last.RawValue, `"'`); index > -1 { // TODO index needs to be stored during scanning + prefix = last.RawValue[:index] // TODO test - this is wrong (needs to be value up to rawvalue index -> just rescan the substring) } }