fix duplicate tag issue #1326

This commit is contained in:
Joe Planisky
2023-06-20 16:58:15 -04:00
committed by Tinmarino
parent a1ca439719
commit 89315912b1
+1 -5
View File
@@ -123,15 +123,12 @@ function! s:scan_tags(lines, page_name) abort
" Scan line for tags. There can be many of them.
let str = line
while 1
" Get all matches
let tag_groups = []
call substitute(str, tag_search_rx, '\=add(tag_groups, submatch(0))', 'g')
if tag_groups == []
break
continue
endif
let tagend = matchend(str, tag_search_rx)
let str = str[(tagend):]
for tag_group in tag_groups
for tag in split(tag_group, tag_format.sep)
" Create metadata entry
@@ -154,7 +151,6 @@ function! s:scan_tags(lines, page_name) abort
call add(entries, entry)
endfor
endfor
endwhile
endfor " loop over lines
return entries