Module:Template input utils: Difference between revisions
add empty function for param normalizing |
No edit summary |
||
| Line 13: | Line 13: | ||
-- Normalize params to snake case; anything close enough to snake case is | -- Normalize params to snake case; anything close enough to snake case is | ||
-- converted to snake case: | -- converted to snake case: | ||
-- - | -- TRAIN_CASE, KEBEB-CASE, no dashes (OK!) | ||
-- | -- PascalCase, camelCase (will not convert properly) | ||
-- - | -- Function work-in-progress | ||
function p.normalize_params(args) | function p.normalize_params(args) | ||
-- Local function for normalizing strings | |||
-- Spaces and dashes turn into underscores | |||
-- and all capital letters become lowercase | |||
local function normalize(input_string) | |||
local cleaned_string = string.gsub(string.lower(input_string), "[%-%s]", "_") | |||
end | |||
end | end | ||