Don't output a last empty line

This commit is contained in:
Christophe HENRY 2021-03-09 20:27:42 +01:00
parent 29e7d6fc14
commit 7222306779
2 changed files with 1 additions and 1 deletions

1
TODO
View File

@ -5,7 +5,6 @@
* Page menu on upper and lower sides: [parent dir] [root dir] [inline images] [raw response] [view cert]
* Check unicode capability, UTF16 input, etc…
* Manage different type of carriage return: CR CR/LF LF
* Do not output an empty line for the last carriage return of the document
* Text localisation
* Manage logging (cache refresh, debug)
* Split the main loop in two: one part to decode the text to internal language, the other to make the HTML

View File

@ -138,6 +138,7 @@ function htmlPrepare(&$text) {
function translateGemToHtml($fileContents) {
$fileLines = preg_split("/\n/", $fileContents);
if (empty($fileLines[-1])) array_pop($fileLines); # Don't output a last empty line
ob_start();
$mode = null;
$mode_textAttributes = true;