You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test = r'''%@article {Cat61,
% AUTHOR = {Cattabriga, Lamberto},
'''
I am parsing LaTeX, and IPython grabs each line starting with '%' as an ipython_magic function instead of correctly recognizing that '%' appears in a raw string.
"% AUTHOR = {Cattabriga, Lamberto},\nget_ipython().magic(u'TITLE = {Su un problema al contorno relativo al sistema di equazioni di')\n"
The bad parsing is triggered by the comma and newline at the end of the first line.
test = r'''%test,
%test2
'''
"%test,\nget_ipython().magic(u'test2')\n"
test = r'''%test
%test2
'''
'%test\n%test2\n'
The text was updated successfully, but these errors were encountered:
@ayr0 thanks for the report, but can you please provide more detail about what version of IPython you are running (ipython --version), and what client you are using (good ole terminal ipython, ipython qtconsole, console, web notebook?)
I am unable to reproduce the error you see on any of the recent version (git master, 0.13, 0.12, or 0.11)
@takluyver recently did some work on how these magics are processed, so he might have an idea.
This is essentially the same issue as #2612, so I'm going to close this, and we'll track it there. I have some ideas about how to fix it, but I want to get PR #2447 sorted out first.
IPython incorrectly parses the following input
I am parsing LaTeX, and IPython grabs each line starting with '%' as an ipython_magic function instead of correctly recognizing that '%' appears in a raw string.
The bad parsing is triggered by the comma and newline at the end of the first line.
The text was updated successfully, but these errors were encountered: