Skip to content

Commit 0394c9a

Browse files
markwumr-russ
authored andcommitted
Added missed EOL when merge mLines
1 parent d4ebfa2 commit 0394c9a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

PHPCtags.class.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ private function render($structure)
363363
$str .= "\n";
364364
}
365365

366-
// remove the last line ending
367-
$str = trim($str);
366+
// remove the last line ending and carriage return
367+
$str = trim(str_replace("\x0D", "", $str));
368368

369369
return $str;
370370
}
@@ -374,7 +374,7 @@ private function full_render() {
374374

375375
$str = '';
376376
foreach($this->mLines as $file => $data) {
377-
$str .= $data;
377+
$str .= $data.PHP_EOL;
378378
}
379379

380380
// sort the result as instructed
@@ -389,6 +389,9 @@ private function full_render() {
389389
echo "Saved cache file.".PHP_EOL;
390390
}
391391
}
392+
393+
$str = trim($str);
394+
392395
return $str;
393396
}
394397

0 commit comments

Comments
 (0)