Feature: Markdown anchor normalize and unormalize (Issue #664)

Add normalize anchor and unnormalize to get markdown anchor github
compliant. For respectively follow_link and VimwikiTOC

TODO: Treat the potential -12 suffix in anchor-links: ex:
[got to second link](same-link-2)
This commit is contained in:
Tinmarino
2020-08-02 22:05:37 -04:00
parent 1b16720b7b
commit a27940a394
4 changed files with 193 additions and 53 deletions
+3 -1
View File
@@ -61,7 +61,6 @@ function! vimwiki#u#count_exe(cmd) abort
endfunction
" Trim spaces: leading and trailing
function! vimwiki#u#sort_len(list) abort
function! s:len_compare(s1, s2) abort
let i1 = len(a:s1)
@@ -72,6 +71,9 @@ function! vimwiki#u#sort_len(list) abort
endfunction
" Trim spaces: leading and trailing
" :param: string in
" :param: (1) <string> optional list of character to trim
function! vimwiki#u#trim(string, ...) abort
let chars = ''
if a:0 > 0