Module:Track gauge and Module:Track gauge/sandbox: Difference between pages
(Difference between pages)
imported>Graham87 m rm role=math per Wikipedia talk:Manual of Style/Accessibility#Role=math |
imported>Lemondoge minor simplification |
||
Line 3: | Line 3: | ||
local p = {} | local p = {} | ||
local gaugeDataAll = nil | local gaugeDataAll = nil | ||
local dataPageName = 'Module:Track gauge/data' -- set /data/sandbox here to test data/sandbox | local dataPageName = 'Module:Track gauge/data/sandbox' -- set /data/sandbox here to test data/sandbox | ||
----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ||
-- prepareArgs -- Normalise Arguments coming from an #invoke or from a module | -- prepareArgs -- Normalise Arguments coming from an #invoke or from a module | ||
Line 113: | Line 113: | ||
-- it at the callsite because of [[:phab:T200704]] | -- it at the callsite because of [[:phab:T200704]] | ||
return mw.ustring.format( | return mw.ustring.format( | ||
'<span class="frac">%s<span class="num">%s</span>⁄<span class="den">%s</span></span>', | '<span class="frac" role="math">%s<span class="num">%s</span>⁄<span class="den">%s</span></span>', | ||
whole and (whole .. '<span class="sr-only">+</span>') or '', | whole and (whole .. '<span class="sr-only">+</span>') or '', | ||
num, | num, | ||
Line 326: | Line 326: | ||
end | end | ||
-- The joint and the second measure | -- The joint and the second measure | ||
if disp | if disp ~= '1' then | ||
local joinText = '' | local joinText = '' | ||
local closeDisp = '' | local closeDisp = '' |