An llm would “know” not to put spaces around an em dash. An en dash should have spaces.
I've actually seen LLMs put spaces around em dashes more often than not lately. I've made accusations of humanity only to find that the comment I was replying to was wholly generated. And I asked, there was no explicit instruction to misuse the em dashes to enhance apparent humanity.