feat: denote directory support
This commit is contained in:
@@ -10,7 +10,7 @@ function denote#meta#fileFromNoteId(noteId)
|
||||
" (A) First, we get all files that contain the note id as substring.
|
||||
" (B) Then we ensure that the note id is followed by another field or by the
|
||||
" file extension.
|
||||
let files = glob("*" .. a:noteId .. "*", 0, v:true)
|
||||
let files = glob(t:denote_directory .. "*" .. a:noteId .. "*", 0, v:true)
|
||||
\ ->filter('v:val =~ "' .. a:noteId .. '\\(==\\|--\\|__\\|\\.\\)"')
|
||||
\ ->filter('v:val =~ "^' .. a:noteId .. '\\|@@' .. a:noteId .. '"')
|
||||
return empty(files) ? v:false : files[0]
|
||||
|
||||
Reference in New Issue
Block a user