Skip to content

Commit

Permalink
fix: greedy match for (dotted) extensions (#199)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Courtis <alex@courtis.org>
  • Loading branch information
nobuhikosawai and alex-courtis committed Feb 11, 2023
1 parent d7f598e commit bd7a222
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/nvim-web-devicons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,7 @@ local function get_default_icon()
end

local function get_icon(name, ext, opts)
ext = ext or name:match("^.*%.(.*)$") or ""
ext = ext or name:match("^.-%.(.*%.*.*)$") or ""
if not loaded then
setup()
end
Expand Down Expand Up @@ -1818,7 +1818,7 @@ local function get_icon_by_filetype(ft, opts)
end

local function get_icon_colors(name, ext, opts)
ext = ext or name:match("^.*%.(.*)$") or ""
ext = ext or name:match("^.-%.(.*%.*.*)$") or ""
if not loaded then
setup()
end
Expand Down

0 comments on commit bd7a222

Please sign in to comment.