imported>Mikhail
Новая страница: «--This module convert strings to numbers. local p = {} -- Get first integer number from string. function p.integer( frame ) local s = frame.args[1] s = string.gsub( s, '<[^<>]+>', '' ) -- strip HTML tags s = string.gsub( s, '[^0-9]', ' ' ) s = mw.text.trim( s ) s = mw.text.split( s, ' ' )[1] return tonumber( s ) end -- Get number from quantity (e.g. from Wikidata). function p.quantity( frame ) local s = frame.args[1] s...»