This commit is contained in:
@ -2565,8 +2565,10 @@ function! vimwiki#base#is_diary_file(filename, ...) abort
|
||||
let l:diary_file_paths = a:0 > 0 ? a:1 : vimwiki#diary#get_diary_files()
|
||||
let l:normalised_file_paths =
|
||||
\ map(l:diary_file_paths, 'vimwiki#path#normalize(v:val)')
|
||||
" Escape single quote (Issue #886)
|
||||
let filename = substitute(a:filename, "'", "''", 'g')
|
||||
let l:matching_files =
|
||||
\ filter(l:normalised_file_paths, "v:val ==# '" . a:filename . "'" )
|
||||
\ filter(l:normalised_file_paths, "v:val ==# '" . filename . "'" )
|
||||
return len(l:matching_files) > 0 " filename is a diary file if match is found
|
||||
endfunction
|
||||
|
||||
|
Reference in New Issue
Block a user