From e7f9f1ff7a3fe87147acf3622c7ea536f98eb029 Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Sat, 23 Nov 2013 11:39:58 +0100 Subject: [PATCH] Fixed little bug in getCodeSnippet method --- src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php b/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php index f093e14..19d3d70 100644 --- a/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php +++ b/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php @@ -37,7 +37,7 @@ public function getCodeSnippet($source, $lineNumber, $linesBefore = 2, $linesAft $lines = $this->colorLines($tokenLines); end($lines); - $lineStrlen = strlen(key($lines)); + $lineStrlen = strlen(key($lines) + 1); $snippet = ''; foreach ($lines as $i => $line) {