-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: updated to current link format #6
Conversation
atm there is no space after * etc |
.. inserted_file | ||
.. entry.display:gsub("^(%W+)%s+.+", "%1") | ||
.. entry.display:gsub("^(%W+)%s+.+", "%1 ") | ||
.. entry.ordinal:gsub("[%*#%|_]", "\\%1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm understanding this regex correctly this is checking for the various symbols that need escaping. If that is true, then we need to add all detached modifiers which can be linked against, right @vhyrro?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I don't think we need to escape custom symbols anymore, only }
symbols in the case of {this}
and ]
symbols in the case of [this]
.
@@ -76,8 +79,6 @@ local function generate_links() | |||
return | |||
end | |||
|
|||
vim.fn.bufload(full_path_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced with readfile because it's much faster
if vim.api.nvim_get_current_buf() ~= bufnr then | ||
vim.cmd('bunload! ' .. bufnr) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer needed because of the readfile
file = file:gsub(".norg", "") | ||
else | ||
lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use readfile instead of buf_get_lines
No description provided.