handle colons in paths for tags properly

cc #857
This commit is contained in:
Gokcehan committed 2022-06-26 15:36:17 +03:00
1 parent 36a7a18316
commit aee5c3371f
1 file changed
+6 -3
+6 -3
View File
@@ -1667,9 +1667,12 @@ func (nav *nav) readTags() error {
scanner := bufio.NewScanner(f) scanner := bufio.NewScanner(f)
for scanner.Scan() { for scanner.Scan() {
toks := strings.SplitN(scanner.Text(), ":", 2) text := scanner.Text()
if _, ok := nav.tags[toks[0]]; !ok { ind := strings.LastIndex(text, ":")
nav.tags[toks[0]] = toks[1] path := text[0:ind]
mark := text[ind+1:]
if _, ok := nav.tags[path]; !ok {
nav.tags[path] = mark
} }
} }