commit 3cd5d01
Randy Palamar
·
2024-02-08 12:54:13 +0000 UTC
parent 73a0593
man: don't duplicate section extension
1 files changed,
+2,
-4
+2,
-4
1@@ -494,10 +494,8 @@ function man(srcs, section)
2
3 local base = src:match('[^/]*$')
4 local ext = base:match('%.([^.]*)$')
5- if section then
6- if ext then base = base:sub(1, -(#ext + 2)) end
7- ext = section
8- end
9+ if ext then base = base:sub(1, -(#ext + 2)) end
10+ if section then ext = section end
11 if config.gzman ~= false then
12 build('gzip', out, src)
13 src = out