如下代码
<table>
$len(lines)
$for itor in lines:
<tr>
$ (line, type) = itor
$if type==1:
<font size=2pt color=blue>
$elif type==2:
<font size=4pt color=red>
$elif type==3:
<font size=2pt color=red>
$else:
<font size=2pt color=black>
$:line</font><br/>
<tr>
</table>
得到:
<table>
<tbody><tr>
</tr><tr>
</tr><tr>
</tr><tr>
...35个(略)
</tr><tr>
</tr><tr>
</tr><tr>
</tr></tbody></table>
怎么也理解不了Webpy的逻辑
后来终于搞明白了,原来是行结束的tr,我少了一个斜杠,webpy看来是严格按照html标签闭合情况进行处理的,兼容性不够好,当然,是在出错的情况下。
修改后,一切OK了