-
Notifications
You must be signed in to change notification settings - Fork 210
FIX: Output from code execution is not stripped #475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #475 +/- ##
==========================================
+ Coverage 96.28% 96.29% +0.01%
==========================================
Files 29 29
Lines 2636 2647 +11
==========================================
+ Hits 2538 2549 +11
Misses 98 98
Continue to review full report at Codecov.
|
|
Can you add a small test to
I would worry that an indentation of the first line could be interpreted as the intended indentation "level" for the code block. But maybe as long as they are all indented by at least 4 spaces (as they will be) it won't matter if the first one is indented by, say, 8 spaces. Have you tried it / does it work? If it doesn't, there is probably some RST trick to make it work. One way it probably won't is if there is only a single line, and there is starting whitespace. In this case, we could probably do something fancy with unicode spacing to force it to actually space it out, but this might be overkill. |
|
I added the requested test.
I tested this and I found that this is not a problem.
I think indentation for a single output line is not necessary, since indentation is usually used to align multiple lines to each other. |
|
Could you have a look, what went wrong here? The failure is in |
larsoner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AppVeyor error looks spurious, I restarted it. LGTM +1 for merge
|
Thanks @padix-key ! |
This PR removes the whitespace stripping from code output. Therefore, indent at the beginning of the output will be retained.
Example:
With this PR:
Without this PR:
Is there any case, where stripping is neccessary?