Don't try to match overlapping tags.
authorTom Clegg <tom@tomclegg.ca>
Sun, 19 Jan 2020 02:53:34 +0000 (21:53 -0500)
committerTom Clegg <tom@tomclegg.ca>
Sun, 19 Jan 2020 02:53:34 +0000 (21:53 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

taglib.go

index 1b66e443eee223df1115ae605bb368a23868ea1d..367b9c4fff4e06047730379848acad38bb4ace01 100644 (file)
--- a/taglib.go
+++ b/taglib.go
@@ -55,6 +55,7 @@ func (taglib *tagLibrary) FindAll(buf []byte, fn func(id tagID, pos int)) {
                        continue
                } else {
                        fn(taginfo.id, i)
+                       i += len(taginfo.tagseq) - 1 // don't try to match overlapping tags
                }
        }
 }