This demonstration is powered by the Drupal CommonMark module.
This is a module that provides a text format filter and converts Markdown to HTML based on the CommonMark spec. It utilizes the PHP library thephpleague/commonmark which was created and is maintained by The League of Extraordinary Packages.
The CommonMark module also supports the two additional extensions:
$markdown = '# Hello World!';
$html = commonmark_convert_to_html($markdown);
print $html; // <h1>Hello World!</h1>