Skip to content
Crozzers edited this page Jan 3, 2024 · 4 revisions

markdown-in-html extra

The markdown-in-html extra allows for the use of the markdown="1" attribute in a block HTML tag, to have markdown processing be done on its contents. It is similar to the PHP Markdown-Attr Extra but with some limitations.

From version 2.4.13, putting Markdown syntax on the same line as the block-level HTML is supported. Prior to this, the HTML tags had to be on separate lines to the Markdown for this to work.

command-line usage

$ cat foo.txt <div markdown='1'> This is a **bold statement**. </div> $ markdown2 -x markdown-in-html foo.txt <div> <p>This is a <strong>bold statement</strong>.</p> </div> 

(Return to Extras page.)

Clone this wiki locally