Module:SolidBlock
Documentation for this module may be created at Module:SolidBlock/doc
return {convert=function(frame)
local s
for k,v in pairs(frame.args or mw.getCurrentFrame().args) do
if type(k)=='string' then
s=k..'='..v
else
s=v
end
end
local z={[1]=string.sub(s,1,string.find(s,'\n\n')-1)}
while string.find(s,'\n\n') do
local x=string.find(s,'\n\n')+0
s=string.sub(s,x+2)
local t
if string.find(s,'\n\n') then
x=string.find(s,'\n\n')+0
t=string.sub(s,1,x-1)
else
t=s
end
table.insert(z,t)
end
for k,v in pairs(z) do
if string.sub(v,1,2)=='--' then
z[k]='<p style="font-size:250%;font-family:Arial,黑体;color:green">'..string.sub(v,3)..'</p>'
elseif string.sub(v,1,1)=='-' then
z[k]='<p style="font-size:175%;color:maroon"><b>'..string.sub(v,2)..'</b></p>'
else
z[k]='<p style="text-indent:2em">'..v..'</p>'
end
end
return table.concat(z) end
}