Spaces are not output by the post. They are "forced" by the other commands output. If you look at the next code output after the block # you'll find it has a space in front of it. Somewhere in the formatting you might find a " G" used to output the gcode.
So... You have to go thru the entire post to find everywhere there is a space and remove it manually. Your machine probably doesnt care about the space. If I were you I wouldn't worry about it either. Lots of extra work for something that doesn't make the machine run any better.