Content deleted Content added
No edit summary |
No edit summary |
||
Line 2:
-- {{subst:#invoke:CFB schedule/convert|table|...}}
local p = {}
local function parseHeader(s)
return '{' .. s .. '}'
end
local function parseFooter(s)
return '{' .. s .. '}'
end
local function parseEntry(s)
s = '♦MARK♦' .. s
k = 0
while mw.ustring.find(s, '♦MARK♦') and (k < 100) do
k = k + 1
mw.ustring.gsub('(♦MARK♦)%s*%|%s*([^%|{}%[%]=]*=)', '♦%2%1')
mw.ustring.gsub('(♦MARK♦)([^%|{}%[%]=]*)', '%2%1')
mw.ustring.gsub('(♦MARK♦)({[^{}]*})', '%2%1')
mw.ustring.gsub('(♦MARK♦)(%[[^%[%]]*%])', '%2%1')
mw.ustring.gsub('♦MARK♦$', '')
end
return '{' .. s .. '}'
end
function p.table(frame)
Line 10 ⟶ 32:
s = mw.ustring.sub(s,1,-3)
if mw.ustring.sub(s,1,5) == 'Entry' then
res = res ..
elseif mw.ustring.sub(s,1,5) == 'Start' then
res = res ..
elseif mw.ustring.sub(s,1,3) == 'End' then
res = res ..
else
res = res .. t
|