Commit 9ba1b62b authored by Alexis Brenon's avatar Alexis Brenon
Browse files

馃摑 Link more types

parent 7dd32717
......@@ -49,6 +49,10 @@ local docUrls = {
nn = "https://github.com/torch/nn/blob/master/doc/%s",
hash = "https://github.com/torch/hash",
penlight = "http://stevedonovan.github.io/Penlight/api/%s",
lua_fd = "https://www.lua.org/pil/21.2.html",
lua_int = "https://www.lua.org/pil/2.3.html",
lua_num = "https://www.lua.org/pil/2.3.html",
lua_func = "https://www.lua.org/pil/2.6.html",
}
custom_see_handler('^(torch%..*)/(.*)/$', function(name, file)
local url = docUrls.Torch:format(file)
......@@ -66,7 +70,16 @@ custom_see_handler('^penlight%.?(.*)/(.*)/$', function(name, file)
return name, url
end)
custom_see_handler('^(io.file_descriptor)$', function(name)
return name, "https://www.lua.org/manual/5.3/manual.html#6.8"
return name, docUrls.lua_fd
end)
custom_see_handler('^(int[eger]*)$', function(name)
return "integer", docUrls.lua_int
end)
custom_see_handler('^(num[ber]*)$', function(name)
return "number", docUrls.lua_num
end)
custom_see_handler('^(func[tion]*)$', function(name)
return "function", docUrls.lua_func
end)
postprocess_html = function(str, m)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment