Update:
It turns out the plugin recommended by the discourse community,
ruby-bbcode-to-md is basically garbage, and completely mangles
code in migration.
I want to thank MadeInGermany for finding that bug. It's serious and it's ugly.
The code, as migrated, is unacceptable.
Now, we have to figure out what we are going to do about it.
Personally, I need to sleep on it as I am not a happy camper at the moment.
Update: A Warning to Migrators
Ruby-bbcode-to-md gem is a code mangler