mirror of
https://github.com/kennethreitz/clint.git
synced 2026-06-05 14:50:17 +00:00
added '\n' indentation injection support
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user