mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
Fix #15: silly bug caused following non-special links to crash
This commit is contained in:
@@ -388,7 +388,8 @@ You can `follow_link()` all of the above, with the exception of media links, whi
|
||||
Note that notes linked to with headings or paragraph IDs **will not be created automatically**. Non-existing notes will
|
||||
be ignored, a global search will be performed instead.
|
||||
|
||||
For now, you have to create such links yourself. You can edit existing links and append headings, for example: From `[[The note]]` to `[[The note#Some heading or subheading]]`.
|
||||
For now, you have to create such links yourself. You can edit existing links and append headings, for example: From
|
||||
`[[The note]]` to `[[The note#Some heading or subheading]]`.
|
||||
|
||||
Regarding linking to paragraphs: The `^blockid` notation is supported by more and more tools now. It works like this:
|
||||
|
||||
|
||||
@@ -473,7 +473,7 @@ local function FollowLink(opts)
|
||||
local search_mode = "files"
|
||||
|
||||
local parts = vim.split(title, "#")
|
||||
local filename
|
||||
local filename = ''
|
||||
|
||||
-- if there is a #
|
||||
if #parts ~= 1 then
|
||||
@@ -560,6 +560,7 @@ local function FollowLink(opts)
|
||||
cwd = cwd,
|
||||
prompt_title = "Notes referencing `" .. title .. "`",
|
||||
default_text = search_pattern,
|
||||
-- link to specific file (a daily file): [[2021-02-22]]
|
||||
-- link to heading in specific file (a daily file): [[2021-02-22#Touchpoint]]
|
||||
-- link to heading globally [[#Touchpoint]]
|
||||
-- link to heading in specific file (a daily file): [[The cool note#^xAcSh-xxr]]
|
||||
|
||||
Reference in New Issue
Block a user