Skip to content

Commit a1d2617

Browse files
author
neo451
committed
chore(release): bump version to v3.14.1 for release
1 parent 30ef8d3 commit a1d2617

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## [v3.14.1](https://github.com/obsidian-nvim/obsidian.nvim/releases/tag/v3.14.1) - 2025-10-07
11+
12+
### Fixed
13+
14+
- `follow_link` properly prompt to create new note.
15+
1016
## [v3.14.0](https://github.com/obsidian-nvim/obsidian.nvim/releases/tag/v3.14.0) - 2025-10-07
1117

1218
### Added

lua/obsidian/api.lua

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,9 @@ end
541541
---@param opts { open_strategy: obsidian.config.OpenStrategy|? }|?
542542
M.follow_link = function(link, opts)
543543
opts = opts and opts or {}
544+
local Note = require "obsidian.note"
544545

545-
local location, _, link_type = util.parse_link(link, {
546+
local location, name, link_type = util.parse_link(link, {
546547
include_naked_urls = true,
547548
include_file_urls = true,
548549
})
@@ -582,7 +583,26 @@ M.follow_link = function(link, opts)
582583

583584
local notes = search.resolve_note(location, {})
584585
if vim.tbl_isempty(notes) then
585-
log.err "failed to resolve note"
586+
if M.confirm("Create new note '" .. location .. "'?") then
587+
---@type string|?, string[]
588+
local id, aliases
589+
if name == location then
590+
aliases = {}
591+
else
592+
aliases = { name }
593+
id = location
594+
end
595+
596+
local note = Note.create { title = name, id = id, aliases = aliases }
597+
return note:open {
598+
open_strategy = opts.open_strategy,
599+
callback = function(bufnr)
600+
note:write_to_buffer { bufnr = bufnr }
601+
end,
602+
}
603+
else
604+
return log.warn "Aborted"
605+
end
586606
elseif #notes == 1 then
587607
local note = notes[1]
588608
jump_to_note(note, block_link, anchor_link)

lua/obsidian/version.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
return "3.14.0"
1+
return "3.14.1"

0 commit comments

Comments
 (0)