diff --git a/CHANGELOG.md b/CHANGELOG.md index 98d6a8c74..bb249375e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Fixed + +- A but when following links when headers have a space. + ## [v1.13.0](https://github.com/epwalsh/obsidian.nvim/releases/tag/v1.13.0) - 2023-08-24 ### Added diff --git a/lua/obsidian/command.lua b/lua/obsidian/command.lua index 0d7d10a96..4ae44ef05 100644 --- a/lua/obsidian/command.lua +++ b/lua/obsidian/command.lua @@ -571,7 +571,7 @@ command.follow = function(client, _) end -- Remove header link from the end if there is one. - local header_link = note_file_name:match "#[%a%d-_]+$" + local header_link = note_file_name:match "#[%a%d -_]+$" if header_link ~= nil then note_file_name = note_file_name:sub(1, -header_link:len() - 1) end