Skip to content
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

Fix %paste with blank lines #3390

Merged
merged 3 commits into from Jun 6, 2013
Merged

Fix %paste with blank lines #3390

merged 3 commits into from Jun 6, 2013

Conversation

takluyver
Copy link
Member

Closes gh-3246

This gets things working again. I'm still having a think about whether the remaining API details (stripping email quotes) can be moved into the core input transformers, but this fixes the problem.

This means that automagics won't work in pasted code. I think that's a good idea, because trying to apply automagics widely leads to bizarre and confusing bugs like #3334. Most code that people run using %paste is probably pure-Python code anyway.

Also, if you use %paste foo to transfer the clipboard contents to a variable, there's no obvious reason to expect that the content is Python code, so it now stores the raw string instead of trying to clean it up as code.

@takluyver
Copy link
Member Author

Merging in a couple of days unless anyone objects.

@Carreau
Copy link
Member

Carreau commented Jun 5, 2013

Looks good to me.

@takluyver
Copy link
Member Author

Thanks. In it goes.

takluyver added a commit that referenced this pull request Jun 6, 2013
Fix %paste with blank lines
@takluyver takluyver merged commit ae8d945 into ipython:master Jun 6, 2013
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

%paste regression with blank lines
2 participants