Module:Infobox interval: Difference between revisions
mNo edit summary |
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 | ||
if small then | |||
query = ratio_string | |||
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>' | ||