AP says to format dashes like this — and ellipses ... like this. ...
Who's "correct"?
That's the normal way of using them in British English. Though they also tend to be the (slightly shorter) en-dashes too.
I feel that style is often pretty common on the "old" internet - possibly related to how they can be so easily be replaced by a hyphen back when ascii was a likely limitation.
It's a matter of style preference. I support spaces around em-dashes — particularly for online writing, since em-dashes without spaces make selecting and copying text with precision an unnecessary frustration.
By the way,what other punctuation mark receives no space on at least one side?Wouldn't it look odd,make sentences harder to read,and make ideas more difficult to grok?I certainly think so.Don't you? /s