Does Discourse even employ QA people, @codinghorror ?
This is a trivial bug, with a well over-complicated solution.
How about… just allow multiple spaces at the start of a quote tag? I mean, it takes work and logic to swap out a quote with a code section.
Or just trim
it. Really. Javascript is not hard, Jeff.