Module:Lang: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Undo revision 51274 by Monster Domosed (talk) Tag: Undo |
TheMilkMan (talk | contribs) Seeing if this fixes the decimal point being removed from float values |
||
| Line 304: | Line 304: | ||
-- If value exists, remove non-number symbols (but keep + and -) | -- If value exists, remove non-number symbols (but keep + and -) | ||
if value then | if value then | ||
value = value:gsub("[^0-9+-]", "") | value = value:gsub("[^0-9+-.]", "") | ||
-- Return empty string if nothing left, otherwise return the filtered value | -- Return empty string if nothing left, otherwise return the filtered value | ||
return value ~= "" and value or variable_name | return value ~= "" and value or variable_name | ||