Jump to content

Module:Track gauge and Module:Track gauge/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Content deleted Content added
 
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>&frasl;<span class="den">%s</span></span>',
'<span class="frac" role="math">%s<span class="num">%s</span>&frasl;<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 == '1' then
if disp ~= '1' then
else
local joinText = ''
local joinText = ''
local closeDisp = ''
local closeDisp = ''