(.*?)#i', '\1', $body);
+ // remove JavaScript license information
+ $body = preg_replace('#(.*?)#i', '\1', $body);
+ // convert
to newline
+ $body = br2nl($body);
+ // convert to markdown
+ //$markdown = $Markdownify->parseString($body);
+ // parse to html
+ $html = $Parsedown->text($body);
+ // sanitize
+ $html = $Purifier->purify($html);
+ endif;
// return
return $html;
diff --git a/libreto/vendor/Markdownify b/libreto/vendor/Markdownify
new file mode 160000
index 0000000..53fae3d
--- /dev/null
+++ b/libreto/vendor/Markdownify
@@ -0,0 +1 @@
+Subproject commit 53fae3d777a2474801787a2b1a2259a016724768
diff --git a/libreto/vendor/load.php b/libreto/vendor/load.php
index 79b4fb3..948b4c8 100644
--- a/libreto/vendor/load.php
+++ b/libreto/vendor/load.php
@@ -6,7 +6,11 @@ require_once 'html2opendocument/Base.php';
require_once 'html2opendocument/Text.php';
require_once 'htmlpurifier/library/HTMLPurifier.auto.php';
require_once 'spyc/Spyc.php';
+require_once 'Markdownify/src/Converter.php';
+require_once 'Markdownify/src/ConverterExtra.php';
+require_once 'Markdownify/src/Parser.php';
$Purifier = new HTMLPurifier();
+$Markdownify = new Markdownify\ConverterExtra;
$Parsedown = new ParsedownExtra();
$Parsedown = $Parsedown->setBreaksEnabled(true);
diff --git a/views/snippets/nav.php b/views/snippets/nav.php
index d34a485..48b15bb 100644
--- a/views/snippets/nav.php
+++ b/views/snippets/nav.php
@@ -3,6 +3,7 @@