From 9be82da44951c5b0389592369be0dcca65527e1a Mon Sep 17 00:00:00 2001 From: Hzj_jie Date: Thu, 29 Nov 2018 10:29:14 -0800 Subject: [PATCH] Lower file suffix (#4369) --- frontend/document/documentregistry.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/document/documentregistry.lua b/frontend/document/documentregistry.lua index 22bda7ceb..c00651274 100644 --- a/frontend/document/documentregistry.lua +++ b/frontend/document/documentregistry.lua @@ -13,6 +13,7 @@ local DocumentRegistry = { } function DocumentRegistry:addProvider(extension, mimetype, provider, weight) + extension = string.lower(extension) table.insert(self.providers, { extension = extension, mimetype = mimetype, @@ -53,7 +54,7 @@ end -- @string file -- @treturn boolean function DocumentRegistry:hasProvider(file) - local filename_suffix = util.getFileNameSuffix(file) + local filename_suffix = string.lower(util.getFileNameSuffix(file)) if self.filetype_provider[filename_suffix] then return true