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.
2 parents 25703b5 + 298e9f5 commit d022657Copy full SHA for d022657
IPython/core/magics/code.py
@@ -153,7 +153,9 @@ def strip_initial_indent(lines):
153
154
for line in it:
155
if line.startswith(indent):
156
- yield line[len(indent):]
+ yield line[len(indent) :]
157
+ elif line in ("\n", "\r\n") or len(line) == 0:
158
+ yield line
159
else:
160
# Less indented than the first line - stop dedenting
161
yield line
0 commit comments