WikiBuilder
329
次編輯
小無編輯摘要 |
無編輯摘要 |
||
第182行: | 第182行: | ||
end | end | ||
local start,size,ed = string.match(_str,'(.*)<indent=(.-)%>(.*)'); | local start,size,ed = string.match(_str,'(.*)<indent=(.-)%>(.*)'); | ||
start = start or ''; | |||
if ed then | if ed then | ||
local inn,out = string.match(ed,'(.*)</indent>(.*)'); | local inn,out = string.match(ed,'(.*)</indent>(.*)'); | ||
if inn then _str = start .. string.format("<span class='Indented indent_%s' style='padding-left:%.3fem;'>",size,(tonumber(size)/5)) .. inn .. '</span>' .. out; | if inn and out then _str = start .. string.format("<span class='Indented indent_%s' style='padding-left:%.3fem;'>",size,(tonumber(size)/5)) .. inn .. '</span>' .. out; | ||
else _str = start .. string.format("<span class='Indented indent_%s' style='padding-left:%.3fem;'>",size,(tonumber(size)/5)) .. ed .. '</span>'; | else _str = start .. string.format("<span class='Indented indent_%s' style='padding-left:%.3fem;'>",size,(tonumber(size)/5)) .. ed .. '</span>'; | ||
end | end |