From 169afc4ba53300ada9144d799ffdb9348c763ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Sun, 4 Feb 2024 11:01:16 +0100 Subject: [PATCH] test inlining --- lib/inliner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/inliner.php b/lib/inliner.php index cfaeace..a3ef87b 100644 --- a/lib/inliner.php +++ b/lib/inliner.php @@ -61,7 +61,7 @@ function minifyJs($js) { //$js = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $js); // Remove line comments - $js = preg_replace('/\/\/[^\n]*/', '', $js); + $js = preg_replace('/\/\/(?![^\'"]*(\'|")[^\'"]*(\'|"))[^\n]*/', '', $js); // Remove newlines and tabs //$js = str_replace(array("\r\n", "\r", "\n", "\t"), '', $js);