diff options
author | Fred Drake <fdrake@acm.org> | 2001-11-19 05:28:29 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-11-19 05:28:29 (GMT) |
commit | 27ae3118645eb8dcaf9f597e3f7602c593a97a14 (patch) | |
tree | 62c93317376131bc9c02f2faa668dc9ff6de6d69 /Doc/tools | |
parent | 00c96aeba62cb4be9472375e99db2b6dc26f937e (diff) | |
download | cpython-27ae3118645eb8dcaf9f597e3f7602c593a97a14.zip cpython-27ae3118645eb8dcaf9f597e3f7602c593a97a14.tar.gz cpython-27ae3118645eb8dcaf9f597e3f7602c593a97a14.tar.bz2 |
Avoid trailing blank lines in the output.
Diffstat (limited to 'Doc/tools')
-rwxr-xr-x | Doc/tools/sgmlconv/docfixer.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/tools/sgmlconv/docfixer.py b/Doc/tools/sgmlconv/docfixer.py index 8436784..943b2e3 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(): |