diff --git a/src/Generators/Text.php b/src/Generators/Text.php index 4a368c63ff..895333eb27 100644 --- a/src/Generators/Text.php +++ b/src/Generators/Text.php @@ -231,9 +231,9 @@ protected function printCodeComparisonBlock(\DOMNode $node) } echo '| '; - echo $firstLineText.str_repeat(' ', (47 - strlen($firstLineText))); + echo $firstLineText.str_repeat(' ', max(0, (47 - strlen($firstLineText)))); echo '| '; - echo $secondLineText.str_repeat(' ', (48 - strlen($secondLineText))); + echo $secondLineText.str_repeat(' ', max(0, (48 - strlen($secondLineText)))); echo '|'.PHP_EOL; }//end for