Module:Introspection utils: Difference between revisions
bugfix invocation detector |
mNo edit summary |
||
| Line 335: | Line 335: | ||
-- names as part of an #invoke statement | -- names as part of an #invoke statement | ||
function normalize_module_name(mod_name) | function normalize_module_name(mod_name) | ||
if not mod_name then return nil end | |||
-- Trim whitespace | |||
mod_name = mw.text.trim(mod_name) | |||
-- Replace spaces with underscores | |||
mod_name = mod_name:gsub(" ", "_") | |||
-- Leave as snake case | |||
return mod_name | |||
end | end | ||