Module:Infobox interval: Difference between revisions

Plumtree (talk | contribs)
mNo edit summary
Plumtree (talk | contribs)
m Calc parameter added
Line 325: Line 325:
end
end


if regular and rational then
if value_provided(frame.args['Calc']) or (regular and rational) then
local query = ''
local query = frame.args['Calc'] or ''
if small then
if not value_provided(query) then
query = ratio_string
if small then
else
query = ratio_string
query = '%7C' .. rat.as_ket(ratio, nil, false, true, '%20') .. '%3E'
else
query = '|' .. rat.as_ket(ratio, nil, false, true) .. '>'
end
end
end
query = mw.uri.encode(query)
table.insert(infobox_data, {
table.insert(infobox_data, {
'<small>[https://www.yacavone.net/xen-calc/?q=' .. query .. ' open this interval in \'\'xen-calc\'\']</small>'
'<small>[https://www.yacavone.net/xen-calc/?q=' .. query .. ' open this interval in \'\'xen-calc\'\']</small>'