We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 796fb3e commit ecc9cfcCopy full SHA for ecc9cfc
Lib/textwrap.py
@@ -429,13 +429,13 @@ def dedent(text):
429
if not text:
430
return text
431
432
- # If the input is entirely whitespace, return normalized lines
+ # If the input is entirely whitespace, return normalized lines.
433
if text.isspace():
434
return '\n' * text.count('\n')
435
436
lines = text.split('\n')
437
438
- # Get length of leading whitespace, inspired by ``os.path.commonprefix()``
+ # Get length of leading whitespace, inspired by ``os.path.commonprefix()``.
439
non_blank_lines = [l for l in lines if l and not l.isspace()]
440
l1 = min(non_blank_lines)
441
l2 = max(non_blank_lines)
0 commit comments