-- This module provides some functions to prepare template parameters-- for use with Template:Convert.-- This module is not used by Template:Convert or Module:Convert.
local function stripToNil(text) -- If text is a non-empty string, return its trimmed content, -- otherwise return nothing (empty string or not a string). if type(text)
-- Remove commas and references (any strip markers) from a number.-- First usage in Template:Infobox_UK_place/dist (June 2018)local function cleanNumber(frame) local args = frame.args local text = stripToNil(args[1]) or if text
local fractions =
local fractionNumbers =
-- Format regular input with fraction (MOS-confirmant) into Convert-format "12+3/8" ("+" added).-- First usage in Template:NFL_predraft (August 2017)local function number(frame) --number|12 3/8}} → 12+3/8 Input Output 12 12 12 3/8 12+3/8 12+3/8 12 12+3/8 12⅜ 12+3/8 Template:Fraction redirects to Template:Frac so either may be used in the input. local args = frame.args local text = stripToNil(args[1]) or if text
return