From 2bae2fd2234286d622859879b5ef2ab0c14cbcdf Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 20 Mar 2011 15:44:37 -0400 Subject: [PATCH] added '\n' indentation injection support --- clint/textui/core.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clint/textui/core.py b/clint/textui/core.py index 780fc9e..21a724d 100644 --- a/clint/textui/core.py +++ b/clint/textui/core.py @@ -57,6 +57,12 @@ class Writer(object): def __call__(self, s, newline=True, stream=STDOUT): + + if newline: + s = s.split('\n') + indent = ''.join(self.shared['indent_strings']) + s = (indent + '\n').join(s) + _str = ''.join(( ''.join(self.shared['indent_strings']), str(s),