Module:Introspection utils: Difference between revisions

Ganaram inukshuk (talk | contribs)
add alternate implementation of get_and_preprocess_content that uses one fullpagename instead of separate namespace and pagename
Ganaram inukshuk (talk | contribs)
bugfix invocation detector
Line 340: Line 340:
-- Replace spaces with underscores
-- Replace spaces with underscores
mod_name = mod_name:gsub(" ", "_")
mod_name = mod_name:gsub(" ", "_")
-- Capitalize first letter (respecting Unicode if possible)
-- Leave module name in snake_case
mod_name = mw.ustring.upper(mw.ustring.sub(mod_name, 1, 1)) .. mw.ustring.sub(mod_name, 2)
return mod_name
return mod_name
end
end