Having had the very same problem and looking at your png of the toggled code I can tell you that hummina did exactly the same thing I did. He copied and pasted your example from your doc into his code to get all that formatting.
Given this seems to happen more than it should, I would suggest a warning in your doc about pasting special text only or some such thing or you will be answering this one forever.