summaryrefslogtreecommitdiff
path: root/itjs.class
diff options
context:
space:
mode:
authorChristian Schneider2025-01-30 18:10:45 +0100
committerChristian Schneider2025-01-30 18:10:45 +0100
commitf84613b4be4745f70f429ed4dd336531ff94b9a3 (patch)
treedda1201c6ebce4715492def6a763811a978d86bd /itjs.class
parent4b82583c4421dfb4aa3b2d9dd622530ed97ae50f (diff)
downloaditools-f84613b4be4745f70f429ed4dd336531ff94b9a3.tar.gz
itools-f84613b4be4745f70f429ed4dd336531ff94b9a3.tar.bz2
itools-f84613b4be4745f70f429ed4dd336531ff94b9a3.zip
Fix bug when js file ends with comment but has no final newline leading to stripping first line of next line
Diffstat (limited to 'itjs.class')
-rw-r--r--itjs.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/itjs.class b/itjs.class
index cf77f0c..a333d21 100644
--- a/itjs.class
+++ b/itjs.class
@@ -105,7 +105,7 @@ static function filecontents($filenames)
list($filename, $paramstr) = explode("?", $filename);
if ($paramstr)
$_GET = it::parse_str($paramstr);
- $result .= it::replace(array('^1$' => ""), it::match('\.(js|css|htc|html)$', $filename) ? include_once($filename) : (file_exists($filename) ? it::file_get_contents($filename) : it_url::get($filename)), array('utf8' => false));
+ $result .= rtrim(it::replace(array('^1$' => ""), it::match('\.(js|css|htc|html)$', $filename) ? include_once($filename) : (file_exists($filename) ? it::file_get_contents($filename) : it_url::get($filename)), array('utf8' => false))) . "\n";
$_GET = $origget;
}
$result .= ob_get_clean();