[Python-checkins] CVS: python/dist/src/Doc/tools/sgmlconv docfixer.py,1.34,1.35
Fred L. Drake
fdrake@users.sourceforge.net
Sun, 18 Nov 2001 21:28:31 -0800
Update of /cvsroot/python/python/dist/src/Doc/tools/sgmlconv
In directory usw-pr-cvs1:/tmp/cvs-serv23292
Modified Files:
docfixer.py
Log Message:
Avoid trailing blank lines in the output.
Index: docfixer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/sgmlconv/docfixer.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** docfixer.py 2001/09/29 19:07:22 1.34
--- docfixer.py 2001/11/19 05:28:29 1.35
***************
*** 1023,1026 ****
--- 1023,1030 ----
# LaTeX2HTML screwing with GNU-style long options (the '--' problem).
join_adjacent_elements(fragment, "option")
+ # Attempt to avoid trailing blank lines:
+ fragment.normalize()
+ if fragment.lastChild.data[-1:] == "\n":
+ fragment.lastChild.data = fragment.lastChild.data.rstrip() + "\n"
#
d = {}