Module:Module introspection: Difference between revisions
bugfix main function detection |
bugfix main function detection again |
||
| Line 229: | Line 229: | ||
-- is assumed to be the same name as the module. Module assumes snake_case | -- is assumed to be the same name as the module. Module assumes snake_case | ||
-- is used for function names. (If this fails, it can be entered manually.) | -- is used for function names. (If this fails, it can be entered manually.) | ||
local normalized_name = module_name:gsub("[^%w]", "_") | local normalized_name = module_name:gsub("[^%w]", "_"):lower() | ||
local main_function = args["main_function"] or "_" .. normalized_name | local main_function = args["main_function"] or "_" .. normalized_name | ||
-- Call the introspection function | -- Call the introspection function | ||
| Line 239: | Line 239: | ||
-- Return combined tables | -- Return combined tables | ||
return dep_table .. | return dep_table .. "\n" .. func_table .. "\n" .. normalized_name | ||
end | end | ||
return p | return p | ||