Short answer… use HTML, not markdown.
Your example uses markdown. It would need to be cooked. Discourse cooks post on the server. Themes don’t have access to that.
Discourse has an async cook function that can run on the client-side; however, it requires the user to be logged in to resolve short URLs and load oneboxes and images. So, it won’t work for anonymous (not logged-in) users.