diff --git a/TODO b/TODO index 43818ba..427bfe1 100644 --- a/TODO +++ b/TODO @@ -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 diff --git a/index.php b/index.php index 20086e0..99ddd18 100644 --- a/index.php +++ b/index.php @@ -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;