Bug introduced in 10 and fixed in 12.1
Assume the following simple expression
{#"Test"}&
Now go in front of the #
and just start typing another named slot expression. On my system, the front end invalidates the input by magically inserting invisible characters
For a real cool demonstration, look at this
My system is: Mathematica 10.2 on Ubuntu 14.04
Update:
Official response of WRI confirms that it is a bug:
Thank you for taking the time to send in this report. It does appear that entering an additional string (quotation marks) is causing an issue with the front end's box structure, and I have forwarded an incident report to our developers with the information you provided.
"a"(a )^2
. Take one version that you copy and another version that you type by inserting the string at last. Then, look at both expressions by pressingCtrl+Shift+E
to show the box structure. You will see that theSupercriptBox
does not contain the correct elements. $\endgroup$#
will lose track of its corresponding&
and turn pink when, for instance, I introduce new formatted fraction signs in an expression (although I'm having trouble reproducing that right now). Point being: it doesn't seem to be just quotes causing problems. I'll try my best to find an example... $\endgroup$