From 4b3ea5ca8f2ae7223bb1ad24bea07e659eec5f92 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 9 Feb 2016 08:08:17 +0100 Subject: [PATCH] [docmaker] Don't emit trailing newlines. * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code): Use `rstrip'. --- ChangeLog | 7 +++++++ src/tools/docmaker/tohtml.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a19b4decf..21b5c9ef8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2016-02-09 Werner Lemberg + + [docmaker] Don't emit trailing newlines. + + * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code): + Use `rstrip'. + 2016-02-07 Werner Lemberg * Version 2.6.3 released. diff --git a/src/tools/docmaker/tohtml.py b/src/tools/docmaker/tohtml.py index 8da10b8a5..9b28780e9 100644 --- a/src/tools/docmaker/tohtml.py +++ b/src/tools/docmaker/tohtml.py @@ -390,7 +390,7 @@ class HtmlFormatter( Formatter ): """Convert a code sequence to HTML.""" line = code_header + '\n' for l in lines: - line = line + html_quote( l ) + '\n' + line = line + html_quote( l ).rstrip() + '\n' return line + code_footer