Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
fix wrong valid word
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed May 16, 2024
1 parent 489d664 commit 9269eee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/epo/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ local function make_valid_word(str_arg)
if valid == nil or valid == '' then
return str
end
if string.match(valid, ':$') then
return string.sub(valid, 1, -3)
local spos = valid:find('%$')
if spos then
return string.sub(valid, 1, spos - 1)
end
return valid
end
Expand Down

0 comments on commit 9269eee

Please sign in to comment.