OK thanks Mauricio, I was thinking maybe it was something like that, I will check out the character toggle thing and see what turns up 🙂
Copy/paste problems can be so frustrating! Non-breaking spaces are often to blame.
Yeah I've had plenty of problems in the past with copy-paste in other software
I checked the code with show invisibles set in Atom and the only difference it seems to show is that each indented line after the first starts with a hard tab (/t) whereas my working, manually typed in code I indent with double spaces as I believe is the convention
Maybe there are other invisibles it doesn't show - I'm not sure what a non-breaking space is for example? Maybe Atom's "Show invisibles" doesn't show those
I remember in the past the culprit was an invisible, 0-sized character
I also had problems with books that changed "
and '
to an UTF-8 char that's more pleasing in the eyes (but made copy-pasting useless)