summaryrefslogtreecommitdiff
path: root/Master/texmf/scripts/texdoc/search.tlu
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf/scripts/texdoc/search.tlu')
-rw-r--r--Master/texmf/scripts/texdoc/search.tlu9
1 files changed, 8 insertions, 1 deletions
diff --git a/Master/texmf/scripts/texdoc/search.tlu b/Master/texmf/scripts/texdoc/search.tlu
index aa225b7fb46..fc74650e31a 100644
--- a/Master/texmf/scripts/texdoc/search.tlu
+++ b/Master/texmf/scripts/texdoc/search.tlu
@@ -332,7 +332,8 @@ function scan_db(patlist, code, lsr_db)
end
end
--- says if file has a 'good' extenstion according to ext_list
+-- says if file has a known extenstion according to ext_list
+-- (or known basename according to basename_list)
function check_ext(file)
file = string.lower(file)
-- remove zipext if applicable
@@ -352,6 +353,12 @@ function check_ext(file)
end
end
end
+ -- is the basename good?
+ for _, b in ipairs(config.basename_list) do
+ if file:find('^'..b..'$') or file:find('^'..b..'%.') then
+ return true
+ end
+ end
return false
end