From 554c0d7f1ff6598ba9540a57ddb2a2f1091c08dc Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 17 Jun 2017 15:16:52 +0200 Subject: Fix broken lineendings when rendering ascii colors Without -m ansi2html may not close the span tags at the end of the line. Since we wrap the output lines in our own tags those left-open tags break the rendering. Fix it by letting ansi2html wrap lines into tags on it's own. This adds superflous tags in the HTML, but it works nicely. Signed-off-by: Florian Pritz --- application/service/renderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/service') diff --git a/application/service/renderer.php b/application/service/renderer.php index c8643d53f..6f57e7458 100644 --- a/application/service/renderer.php +++ b/application/service/renderer.php @@ -38,7 +38,7 @@ class renderer { if ($lexer == "ascii") { // TODO: use exec safe and catch exception - $ret = (new \libraries\ProcRunner(array('ansi2html', '-p'))) + $ret = (new \libraries\ProcRunner(array('ansi2html', '-p', '-m'))) ->input($content) ->forbid_stderr() ->exec(); -- cgit v1.2.3-24-g4f1b