יחידה:הצג מספר שורות1
ניתן ליצור תיעוד על היחידה הזאת בדף יחידה:הצג מספר שורות1/תיעוד
local function lines(frame)
local num = frame.args["מספר שורות"]+0
local i = 1
local j = 1
local string1 = ""
local string2 = ""
while (j <= num) and not (frame.args[i]==nil) do
if not (frame.args[i]=="") then
string = string.format("%s\n%s",string1,frame.args[i])
j = j + 1
end
i = i+1
end
while (i <=60) and not (frame.args[i]==nil) do
if not (frame.args[i]=="") then
string2 = string.format("%s\n%s",string2,frame.args[i])
j = j + 1
end
i = i+1
end
if (j <= num+1) then
return string.format("%s\n",string1)
else
return string.format("%s\n<div class=\"mw-collapsible mw-collapsed\" style=\"width:20%\">\'\'\'%s\'\'\'<div class=\"mw-collapsible-content\" style=\"width:500%\">%s</div></div>",string1,frame.args["כותרת"],string2)
end
end
return {
['הצג מספר שורות'] = lines,
}