[Zope-Checkins] CVS: Zope/lib/python/StructuredText - ClassicStructuredText.py:1.9
Fred L. Drake, Jr.
fred@zope.com
Tue, 24 Jun 2003 01:13:21 -0400
Update of /cvs-repository/Zope/lib/python/StructuredText
In directory cvs.zope.org:/tmp/cvs-serv22813
Modified Files:
ClassicStructuredText.py
Log Message:
Be more XHTML-friendly.
=== Zope/lib/python/StructuredText/ClassicStructuredText.py 1.8 => 1.9 ===
--- Zope/lib/python/StructuredText/ClassicStructuredText.py:1.8 Wed Nov 20 15:50:41 2002
+++ Zope/lib/python/StructuredText/ClassicStructuredText.py Tue Jun 24 01:13:21 2003
@@ -229,9 +229,9 @@
class Table:
- CELL=' <TD ALIGN=CENTER COLSPAN=%i>%s</TD>\n'
- ROW=' <TR>\n%s </TR>\n'
- TABLE='\n<TABLE BORDER=1 CELLPADDING=2>\n%s</TABLE>'
+ CELL=' <td align="center" colspan="%i">%s</td>\n'
+ ROW=' <tr>\n%s </tr>\n'
+ TABLE='\n<table border="1" cellpadding="2">\n%s</table>'
def create(self,aPar,
td_reg=re.compile(r'[ \t\n]*\|\|([^\0|]*)')
):
@@ -399,10 +399,10 @@
if tagged:
r=''
else:
- r='<PRE>\n'
+ r='<pre>\n'
for s in structure:
r="%s%s\n\n%s" % (r,html_quote(s[0]),self.pre(s[1],1))
- if not tagged: r=r+'</PRE>\n'
+ if not tagged: r=r.rstrip()+'\n</pre>\n'
return r
def table(self,before,table,after):