We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c9c1ff commit 585190eCopy full SHA for 585190e
lua/orgmode/capture/init.lua
@@ -393,9 +393,13 @@ function Capture:get_destination()
393
return false
394
end
395
396
- local path = destination:match('^.*%.org/')
+ local path = destination:match('^.*%.org/?')
397
local headline_title = path and destination:sub(#path + 1) or ''
398
399
+ if not vim.endswith(path, '/') then
400
+ path = path .. '/'
401
+ end
402
+
403
if not valid_destinations[path] then
404
utils.echo_error(
405
('"%s" is not a is not a file specified in the "org_agenda_files" setting. Refiling cancelled.'):format(path)
0 commit comments