mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 14:14:24 -05:00
fix: follow_links with headerlinks, closes 109
This commit is contained in:
@@ -10,6 +10,7 @@ M.is_tag_or_link_at = function(line, col, opts)
|
||||
|
||||
local seen_bracket = false
|
||||
local seen_parenthesis = false
|
||||
local seen_hashtag = false
|
||||
local cannot_be_tag = false
|
||||
|
||||
while col >= 1 do
|
||||
@@ -41,7 +42,11 @@ M.is_tag_or_link_at = function(line, col, opts)
|
||||
end
|
||||
end
|
||||
else
|
||||
if char == "#" and opts.tag_notation == "#tag" then
|
||||
if char == "#" then
|
||||
seen_hashtag = true
|
||||
end
|
||||
-- Tags should have a space before #, if not we are likely in a link
|
||||
if char == " " and seen_hashtag and opts.tag_notation == "#tag" then
|
||||
if not cannot_be_tag then
|
||||
return "tag", col
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user