From: Fred Drake Date: Mon, 19 Nov 2001 05:28:29 +0000 (+0000) Subject: Avoid trailing blank lines in the output. X-Git-Tag: v2.2.1c1~724 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27ae3118645eb8dcaf9f597e3f7602c593a97a14;p=thirdparty%2FPython%2Fcpython.git Avoid trailing blank lines in the output. --- diff --git a/Doc/tools/sgmlconv/docfixer.py b/Doc/tools/sgmlconv/docfixer.py index 8436784f3619..943b2e308b9f 100755 --- a/Doc/tools/sgmlconv/docfixer.py +++ b/Doc/tools/sgmlconv/docfixer.py @@ -1022,6 +1022,10 @@ def convert(ifp, ofp): # Take care of ugly hacks in the LaTeX markup to avoid LaTeX and # 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 = {} for gi in events.parser.get_empties():