Done via:
https://github.com/discourse/discourse/commit/12706c4b295d260bbf34f5a8afc7e31971b3ea45
There is a new site setting embed support markdown (default off), if enabled the rendering will be same as what we have for topics created on Discourse composer.