mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
Avoid trailing blank lines in the output.
This commit is contained in:
parent
00c96aeba6
commit
27ae311864
1 changed files with 4 additions and 0 deletions
|
|
@ -1022,6 +1022,10 @@ def convert(ifp, ofp):
|
||||||
# Take care of ugly hacks in the LaTeX markup to avoid LaTeX and
|
# Take care of ugly hacks in the LaTeX markup to avoid LaTeX and
|
||||||
# LaTeX2HTML screwing with GNU-style long options (the '--' problem).
|
# LaTeX2HTML screwing with GNU-style long options (the '--' problem).
|
||||||
join_adjacent_elements(fragment, "option")
|
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 = {}
|
d = {}
|
||||||
for gi in events.parser.get_empties():
|
for gi in events.parser.get_empties():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue