From the review of https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/591224
We've got some vague gestures in the Html2Wt code about *preprocessing* steps in Html2Wt handling, including an interface in the extension API which (AFAIK) isn't currently hooked up to anything.
It would be *really nice* if this code were a DomProcessor, and were invoked by the same machinery that invoked extension DomProcessors, both in the wt2html and html2wt directions. The current DisplayHack class would be DOMProcessor::wtPostprocess, and DOMProcessor::htmlPreprocess would convert mw:DisplaySpace back to ' ', then we can completely ignore mw:DisplaySpace in the rest of the html2wt pass.
If there's some reason this *wouldn't* work (interferes with selser?) then we should think hard about it and make it work, because that's the architecture we're currently expecting to use for various other extensions which implement DOMProcessor currently.