Module:Xenpaper: Difference between revisions

Ganaram inukshuk (talk | contribs)
Trying previous change again...
ArrowHead294 (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
local mos = require('Module:MOS')
local rat = require('Module:Rational')
local p = {}
local p = {}
local mos = require("Module:MOS")
local rat = require("Module:Rational")


-- TODO:
-- TODO:
Line 32: Line 33:
for i = 1, #step_pattern + 1 do
for i = 1, #step_pattern + 1 do
if i ~= #step_pattern + 1 then
if i ~= #step_pattern + 1 then
text = text .. string.format('%d--_', i - 1)
text = text .. string.format("%d--_", i - 1)
else
else
text = text .. string.format('%d---', i - 1)
text = text .. string.format("%d---", i - 1)
end
end
end
end
text = "https://www.xenpaper.com/#" .. text
text = "https://www.luphoria.com/xenpaper/#" .. text
return text
return text
Line 84: Line 85:
local ratio_as_text = rat.as_ratio(ratios[i], "%2F")
local ratio_as_text = rat.as_ratio(ratios[i], "%2F")
if i ~= #ratios then
if i ~= #ratios then
text = text .. string.format('%d--_', i - 1)
text = text .. string.format("%d--_", i - 1)
else
else
text = text .. string.format('%d---', i - 1)
text = text .. string.format("%d---", i - 1)
end
end
end
end
text = "https://www.xenpaper.com/#" .. text
text = "https://www.luphoria.com/xenpaper/#" .. text
return text
return text
end
end
return p
return p