Skip to content

Commit

Permalink
Allow spaces in header portion of links (#181)
Browse files Browse the repository at this point in the history
* Allow spaces in header portion of links

* fix changelog

---------

Co-authored-by: epwalsh <[email protected]>
  • Loading branch information
mscott99 and epwalsh authored Sep 4, 2023
1 parent e33f077 commit 9ac240d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lua/obsidian/command.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9ac240d

Please sign in to comment.