<?php $data = <<<DATA >A blockquote >on multiple lines >like this. DATA; $md = new Sundown($data); $result = $md->toHtml(); $tidy = new tidy(); $tidy->parseString($result, array("show-body-only" => 1)); $tidy->cleanRepair(); echo (string) $tidy;
#!/usr/bin/php <?php $target_file = "../../README.md"; if ($argc >= 2) { $target_file = $argv[1]; } $md = file_get_contents($target_file); $sd = new Sundown($md); echo $sd->to_html();