The current VimsidianFormatLink function is unique and specialised, so users cannot understand it, and it is difficult to customise.
This command will be removed from this plugin and rebuilt as a link format plugin if necessary.
function! vimsidian#unit#FormatLinkString(s) abort
let s = substitute(a:s, '\v(\s|\n|^|\!|\(|[\u3001]|[\u3002])@<![[', ' [[', 'g')
let s = substitute(s, '\v]](\s|\n|$|\.|\,|\)|[\u3001]|[\u3002])@!', ']] ', 'g')
let s = substitute(s, '\v(\s|\n|^|\!|\(|[\u3001]|[\u3002])@<!\s+[[', ' [[', 'g')
let s = substitute(s, '\v(\!|\(|[\u3001]|[\u3002])@<=\s+[[', '[[', 'g')
let s = substitute(s, '\v]]\s+(\s|\n|$|\.|\,|\)|[\u3001]|[\u3002])@!', ']] ', 'g')
let s = substitute(s, '\v]]\s+(\n|$|\.|\,|\)|[\u3001]|[\u3002])@=', ']]', 'g')
return s
endfunction
Issue
20
The current VimsidianFormatLink function is unique and specialised, so users cannot understand it, and it is difficult to customise.
This command will be removed from this plugin and rebuilt as a link format plugin if necessary.