fix duplicate tag issue #1326
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user