Update :VimikiGenerateTags -- use tags as anchors in links
This commit is contained in:
parent
d72ef4dd70
commit
b912e4e3c7
@ -1997,7 +1997,7 @@ function! vimwiki#base#update_tags(full_rebuild) "{{{
|
||||
endfunction " }}}
|
||||
|
||||
" vimwiki#base#scan_tags
|
||||
" Scans the list (argument) and produces tags metadata dictionary.
|
||||
" Scans the list of text lines (argument) and produces tags metadata.
|
||||
function! vimwiki#base#scan_tags(lines, page_name) "{{{
|
||||
|
||||
let metadata = []
|
||||
@ -2060,8 +2060,11 @@ function! vimwiki#base#scan_tags(lines, page_name) "{{{
|
||||
let entry.lineno = line_nr
|
||||
if line_nr <= (header_line_nr + PROXIMITY_LINES_NR)
|
||||
let entry.link = page_name . '#' . current_complete_anchor
|
||||
else
|
||||
elseif header_line_nr < 0
|
||||
" Tag appeared before the first header
|
||||
let entry.link = page_name
|
||||
else
|
||||
let entry.link = page_name . '#' . tag
|
||||
endif
|
||||
call add(metadata, entry)
|
||||
endwhile
|
||||
|
Loading…
Reference in New Issue
Block a user