134
个编辑
DrLee lihr(讨论 | 贡献) 小 (DrLee lihr移动页面Module:Sandbox/ChartConstantDetail至Module:ChartConstantDetail,不留重定向) |
DrLee lihr(讨论 | 贡献) (有没有谁告诉我 我写的这玩意标签都没闭合怎么能用的??????) |
||
第11行: | 第11行: | ||
local function constantFormat (a) | local function constantFormat (a) | ||
if not(a) then | if not(a) then | ||
return "<span class=\"old-constant\"> - <span>" | return "<span class=\"old-constant\"> - </span>" | ||
end | end | ||
if a["old"] == true then | if a["old"] == true then | ||
return "<span class=\"old-constant\">" .. string.format("%.1f", a["constant"]) .. "<span>" | return "<span class=\"old-constant\">" .. string.format("%.1f", a["constant"]) .. "</span>" | ||
else | else | ||
return "<span class=\"new-constant\">" .. string.format("%.1f", a["constant"]) .. "<span>" | return "<span class=\"new-constant\">" .. string.format("%.1f", a["constant"]) .. "</span>" | ||
end | end | ||
end | end |
个编辑