Skip to content

Commit

Permalink
fix(at-cursor): also strip white space at beginning and end of ref
Browse files Browse the repository at this point in the history
  • Loading branch information
jghauser committed Oct 16, 2024
1 parent 71a35cc commit 788bbab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/papis/at-cursor/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ local function get_ref_under_cursor()
end
end

-- remove all punctuation characters at the beginning and end of string
ref = ref:gsub("^[%p]*(.-)[%p]*$", "%1")
-- remove all punctuation characters and white space at the beginning and end of string
ref = ref:gsub("^[%p%s]*(.-)[%p%s]*$", "%1")

return ref
end
Expand Down

0 comments on commit 788bbab

Please sign in to comment.