We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c38b460 commit b354082Copy full SHA for b354082
src/Parser.php
@@ -22,7 +22,12 @@ class Parser
22
*/
23
public function parse($string)
24
{
25
- $lines = preg_split('(\r\n|\r|\n)', $string);
+ $lines = preg_split('(\r\n|\r|\n)', $string);
26
+
27
+ if (!empty($lines) && $lines[count($lines) - 1] == '') {
28
+ array_pop($lines);
29
+ }
30
31
$lineCount = count($lines);
32
$diffs = array();
33
$diff = null;
0 commit comments