The client-side code causing the error is a regex looking for 2-3 dashes and a space:
e=e.replace(/---?(\s)/g,"—$1")
It can be corrected to also require a space before the dashes:
e=e.replace(/(\s)---?(\s)/g,"$1—$2")
This will also resolve cases like i--
.
From a quick check in the data explorer, it looks like in most people do place spaces on both sides for emdashes: https://data.stackexchange.com/stackoverflow/query/edit/730462