[kupfer] plugin.calculator: Properly strip whitespace before wrapping lines.
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] plugin.calculator: Properly strip whitespace before wrapping lines.
- Date: Mon, 9 Nov 2009 20:25:59 +0000 (UTC)
commit a67591c929d07d3c95646e1071258da0af1ebcdc
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Mon Nov 9 21:25:12 2009 +0100
plugin.calculator: Properly strip whitespace before wrapping lines.
kupfer/plugin/calculator.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/plugin/calculator.py b/kupfer/plugin/calculator.py
index 4ecfe87..d41c926 100644
--- a/kupfer/plugin/calculator.py
+++ b/kupfer/plugin/calculator.py
@@ -50,7 +50,8 @@ class Help (object):
if len(docsplit) < 2:
formatted.append(docstr)
continue
- wrapped_lines = textwrap.wrap(docsplit[1], maxlen - left_margin)
+ wrapped_lines = textwrap.wrap(docsplit[1].strip(),
+ maxlen - left_margin)
wrapped = (u"\n" + u" "*left_margin).join(wrapped_lines)
formatted.append("%s\n %s" % (docsplit[0], wrapped))
uiutils.show_text_result("\n\n".join(formatted), _("Calculator"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]