The code formatting puts the content into a <pre> which preserves spaces, indentation and line breaks.
Just built a tool for that: https://krysoph.github.io/UnicodeData/
It is a single html file with no dependencies, it takes json data and turns into unicode charts.
Neat!
If I use your tool and "Copy HN-ready" and paste here then it works, but oddly if I then edit the post the formatting is lost.
Also, if I just manually post, starting with a blank line, followed by a couple of lines starting with two spaces (e.g. " aaa", " bbb"), then I'm not getting the <pre> code formatting. Any idea what I might be doing wrong?