This site, like many others, automaticaly removes multiple spaces, empty lines at the end of posts, and similar things. The goal is to save screen space and database memory.

I also have had a mystery phantom space inserted into some of my posts. But it doesn't seem to get picked-up when copy pasting.

Wrapping with code tags should preseve spaces for indenting and multiple spaces.