Skip to content

Commit 7b9feb6

Browse files
committed
Fixed an edge case with collecting backlinks
Fixes #663.
1 parent fce967d commit 7b9feb6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

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

1212
- Added `opts.follow_img_func` option for customizing how to handle image paths.
1313

14+
### Fixed
15+
16+
- Fixed an edge case with collecting backlinks.
17+
1418
## [v3.9.0](https://github.com/epwalsh/obsidian.nvim/releases/tag/v3.9.0) - 2024-07-11
1519

1620
### Added

lua/obsidian/client.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,8 @@ Client.find_backlinks_async = function(self, note, callback, opts)
13101310

13111311
-- Prepare search terms.
13121312
local search_terms = {}
1313-
for raw_ref in iter { tostring(note.id), note:fname(), self:vault_relative_path(note.path) } do
1313+
local note_path = Path.new(note.path)
1314+
for raw_ref in iter { tostring(note.id), note_path.name, note_path.stem, self:vault_relative_path(note.path) } do
13141315
for ref in
13151316
iter(util.tbl_unique {
13161317
raw_ref,

0 commit comments

Comments
 (0)