Skip to content

Commit 82ec96f

Browse files
committed
#977 cleanup
1 parent 2db1aed commit 82ec96f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

script/files.lua

+2-5
Original file line numberDiff line numberDiff line change
@@ -662,13 +662,10 @@ end
662662
---@param uri uri
663663
---@return boolean
664664
function m.isLua(uri)
665-
local ext = uri:match '%.([^%.%/%\\]+)$'
666-
if not ext then
667-
return false
668-
end
669-
if ext == 'lua' then
665+
if util.stringEndWith(uri:lower(), '.lua') then
670666
return true
671667
end
668+
-- check customed assoc, e.g. `*.lua.txt = *.lua`
672669
local matcher = m.getAssoc(uri)
673670
local path = furi.decode(uri)
674671
return matcher(path)

0 commit comments

Comments
 (0)