Steven Lu
Steven Lu

Reputation: 43547

How to embed Markdown into HTML in a gracefully-degrading way?

I am currently putting the Markdown inside a <pre> (so that if the browser does not run Javascript, it will display the Markdown as plaintext), but the links, whose syntax in Markdown is to include the link inside angle brackets, are interpreted by the browser as an HTML element inside of the <pre>.

How can I deal with this?

BTW I am using PageDown which I understand to be the system in use by this very website.

Upvotes: 1

Views: 193

Answers (1)

Jared Farrish
Jared Farrish

Reputation: 49248

Although I'm not entirely sure of the overall process involved, if you want the browser to show markup instead of interpret the markup, you need to encode the markup inside the pre.

Upvotes: 1

Related Questions