-
Notifications
You must be signed in to change notification settings - Fork 17
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
Similar bug sending to ipython #3
Comments
Some unit tests would probably help with this, but I don't know how to set that up. |
Huh, this is actually quite a tricky case. Looks like I may have to re-evaluate my approach, and maybe even remove the indentation-fixing functionality from hydrogen-python until I can write some entirely new code for this. I don't want to get too much into the details here, but you can see my second-to-last comment on nteract/hydrogen#862. This bug relates to a fundamental limitation of hydrogen. I thought I could use some simple heuristics to work around this, but looks like that approach is fundamentally flawed. |
Just checking... I assume it's impossible to deal with common leading whitespace in Python specifically by using Python's dedent function? Because Hydrogen has already stripped the text before passing it to Python, right? |
That's right. It looks like the best way to solve this issue is to retrieve the original text (e.g. using Atom's APIs) and recover the unstripped version of the text. This has been on my TODO list for a while now, but I haven't gotten around to implementing it. |
The text was updated successfully, but these errors were encountered: