Skip to content

Commit

Permalink
chore(omni): remove superfluous escaping from regex
Browse files Browse the repository at this point in the history
'#' is not a special character in vim regex. To simplify the
hard-to-read regex for hyperlinks at least a little bit, we remove these
escapings.
  • Loading branch information
seflue committed Oct 22, 2023
1 parent 8caf939 commit 4fddf92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/orgmode/org/autocompletion/omni.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ local properties = {
}

local links = {
line_rgx = vim.regex([[\(\(^\|\s\+\)\[\[\)\@<=\(\*\|\#\|file:\)\?\(\(\w\|\/\|\.\|\\\|-\)\+\)\?]]),
rgx = vim.regex([[\(\*\|\#\|file:\)\?\(\(\w\|\/\|\.\|\\\|-\)\+\)\?$]]),
line_rgx = vim.regex([[\(\(^\|\s\+\)\[\[\)\@<=\(\*\|#\|file:\)\?\(\(\w\|\/\|\.\|\\\|-\)\+\)\?]]),
rgx = vim.regex([[\(\*\|#\|file:\)\?\(\(\w\|\/\|\.\|\\\|-\)\+\)\?$]]),
fetcher = function(url)
local hyperlinks, mapper = Hyperlinks.find_matching_links(url)
return mapper(hyperlinks)
Expand Down

0 comments on commit 4fddf92

Please sign in to comment.