Module:Sandbox/Frietjes: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 4:
 
local function parseHeader(s)
local templates = {}
k = 0
while mw.ustring.find(s, '{[^{}]*}') do
k = k + 1
templates[k] = mw.ustring.match(s, '{[^{}]*}')
s = mw.ustring.gsub(s, '{[^{}]*}', '♦' + k + '♦', 1)
end
return '{' .. s .. '}'
end
Line 19 ⟶ 12:
 
local function parseEntry(s)
local templates = {}
k = 0
while mw.ustring.find(s, '{[^{}]*}') do
k = k + 1
templates[k] = mw.ustring.match(s, '{[^{}]*}')
s = mw.ustring.gsub(s, '{[^{}]*}', '♦' + k + '♦', 1)
end
return '{' .. s .. '}'
end