From 56a1859cdd5537afcaec7e0fd7ec69e9750fb451 Mon Sep 17 00:00:00 2001 From: devxpain <170700110+devxpain@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:46:32 +0800 Subject: [PATCH] fix(search): support @ in naked URLs - Update NakedUrl pattern to allow @ symbol for URLs like https://medium.com/@user --- lua/obsidian/search.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/obsidian/search.lua b/lua/obsidian/search.lua index 6b981c921..a1098c189 100644 --- a/lua/obsidian/search.lua +++ b/lua/obsidian/search.lua @@ -41,7 +41,7 @@ M.Patterns = { WikiWithAlias = "%[%[[^][%|]+%|[^%]]+%]%]", -- [[xxx|yyy]] Wiki = "%[%[[^][%|]+%]%]", -- [[xxx]] Markdown = "%[[^][]+%]%([^%)]+%)", -- [yyy](xxx) - NakedUrl = "https?://[a-zA-Z0-9._-]+[a-zA-Z0-9._#/=&?:+%%-]+[a-zA-Z0-9/]", -- https://xyz.com + NakedUrl = "https?://[a-zA-Z0-9._-@]+[a-zA-Z0-9._#/=&?:+%%-@]+[a-zA-Z0-9/]", -- https://xyz.com FileUrl = "file:/[/{2}]?.*", -- file:/// MailtoUrl = "mailto:.*", -- mailto:emailaddress BlockID = util.BLOCK_PATTERN .. "$", -- ^hello-world