Skip to content

Commit

Permalink
Merge pull request #101 from jghauser/fix-ref-popup-some-more
Browse files Browse the repository at this point in the history
fix(at-cursor): also strip white space at beginning and end of ref
  • Loading branch information
jghauser authored Oct 16, 2024
2 parents 71a35cc + bc2dd5f commit 551920c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/papis.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*papis.txt* For NVIM v0.8.0 Last change: 2024 October 13
*papis.txt* For NVIM v0.8.0 Last change: 2024 October 16

==============================================================================
Table of Contents *papis-table-of-contents*
Expand Down
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 551920c

Please sign in to comment.