From 3d5fbcdebb51f830e18c0a424563037357488868 Mon Sep 17 00:00:00 2001 From: epwalsh Date: Fri, 31 May 2024 08:51:53 -0700 Subject: [PATCH] Fix edge case of deduplicating tags --- lua/obsidian/client.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/obsidian/client.lua b/lua/obsidian/client.lua index 98dea6076..c5fa567d0 100644 --- a/lua/obsidian/client.lua +++ b/lua/obsidian/client.lua @@ -1058,6 +1058,9 @@ Client.find_tags_async = function(self, term, callback, opts) ---@param col_start integer|? ---@param col_end integer|? local add_match = function(tag, path, note, lnum, text, col_start, col_end) + if vim.startswith(tag, "#") then + tag = string.sub(tag, 2) + end if not path_to_tag_loc[path] then path_to_tag_loc[path] = {} end