Module:Sandbox/LVL: Difference between revisionsGive feedback
No edit summary |
No edit summary |
||
| Line 255: | Line 255: | ||
local scaling_abbrevs = {Spirit = "Ss", Level = "PI"} | local scaling_abbrevs = {Spirit = "Ss", Level = "PI"} | ||
if (scaling_value == 0) then return "" end | if (scaling_value == 0) then return "" end | ||
scaling_value = util_module.round_to_sig_fig(scaling_value, 3) | scaling_value = util_module.round_to_sig_fig(scaling_value, 3) | ||
local template_title = "Template:" .. scaling_abbrevs[scaling_type] | |||
local template_title = "Template:" .. scaling_abbrevs[scaling_type] | |||
local template_args = {} | local template_args = {} | ||
template_args["1"] = scaling_value | template_args["1"] = scaling_value | ||
local template_call = mw.getCurrentFrame():expandTemplate{ title = template_title, args = template_args } | local template_call = mw.getCurrentFrame():expandTemplate{ title = template_title, args = template_args } | ||
return template_call | |||
-- STRIP NEWLINES to prevent alignment breaking in tables | |||
return template_call:gsub("\n", ""):gsub("\r", "") | |||
end | end | ||