Module:Convert: Difference between revisions

for a "per" unit, use any specified link rather than constructing it
(fix default precision when input includes a fraction)
(for a "per" unit, use any specified link rather than constructing it)
Line 496:
if per then
local result = { utype = t.utype, per = {} }
override_from(result, t, { 'defaultinvert', 'invertiscomplex', 'iscomplexdefault', 'link', 'symbol', 'symlink' })
result.symbol_raw = (result.symbol or false) -- to distinguish between a defined exception and a metatable calculation
local cvt = result.per
Line 2,100:
else
result = per_word .. ' '
end
if want_link and unit_table.link then
result = (unit1 and unit1[key_id] or '') .. result .. unit2[key_id2]
return make_link(unit_table.link, result, unit_table)
end
if unit1 then
Anonymous user