lunedì 27 marzo 2017

Markdown

Oggi vediamo cosa fa la funzione mergMarkdownToXHTML(). In pratica prende un testo formattato MarkDown e lo converte in HTML.
Ad esempio il testo MarkDown:

An h1 header
============

Paragraphs are separated by a blank line.

2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
look like:

 * this one
 * that one
 * the other one


diventa:

<h1>An h1 header</h1>
 
 <p>Paragraphs are separated by a blank line.</p>
 
 <p>2nd paragraph. <em>Italic</em>, <strong>bold</strong>, and <code>monospace</code>. Itemized lists
 look like:</p>
 
 <ul>
 <li>this one</li>
 <li>that one</li>
 <li>the other one</li>
 </ul>