body { padding: 4rem; margin: 0; font-family: sans-serif; } img { max-width: 100%; } code { word-break: break-word; white-space: break-spaces; } table { width: 100%; } "; $file = dirname(__FILE__)."/README.md"; $source = file_get_contents($file); try { $Instance = new parkdown\Parkdown($source, true, $file); echo $Instance->html(); } catch (parkdown\ParserError $error) { echo "
";
$message = explode(" ", $error->getMessage());
$location = array_shift($message);
$file = explode(":", $location)[0];
if ($file === "INPUT_STRING")
echo "$location ".implode(" ", $message);
else
echo "$location ".implode(" ", $message);
$stackTrace = explode("\n", $error->getTraceAsString());
echo "";
foreach ($stackTrace as $step) {
$step = explode(" ", $step);
array_shift($step);
$location = array_shift($step);
$location = preg_replace("/\(([0-9]+)\):/", ":\$1:", $location);
echo "$location ".implode(" ", $step)."
";
}
echo "
";
}