This is an issue for later down the line, but I noticed that if you highlight and quote text using the "quote" popup in discourse, it trims newlines and extra whitespace when propagating that text into the composer.

I'm not sure how discourse propagates the quote into the composer, so there may be something that we would need to intercept/override.