1
0

bef runner bug fixes

This commit is contained in:
2018-01-03 00:55:15 +01:00
parent 4f7795c70b
commit 17a81b9fea
6 changed files with 25 additions and 16 deletions

View File

@@ -11,7 +11,7 @@ $editable = $PARAM_BEFUNGE93RUNNER['editable'];
function fmtBef($str) {
$str = htmlspecialchars($str);
$str = str_replace("\r\n", "\n", $str);
$str = str_replace("\r", "", $str);
$str = join("\n", array_map(function($p){return rtrim($p);}, explode("\n", $str)));
$str = str_replace(' ', ' ', $str);
$str = nl2br($str);