Fix incorrect handling of newline in TemplateHandler

This commit is contained in:
Kijin Sung 2023-09-05 00:56:17 +09:00
parent 5b5010a401
commit 7a62550c30

View file

@ -330,11 +330,9 @@ class TemplateHandler
$buff = preg_replace([
'/>\<\?php } \?\>\n[\t\x20]*?(?=\n<!--)/',
'/\n[\t\x20]*?(?=\n<!--)/',
'/\n[\t\x20]*?(?=\n)/',
'/\n[\t\x20]+?\<\?php/',
], [
"><?php } ?>\n<?php echo \"\\n\"; ?>",
"\n",
"\n<?php ?>",
"\n<?php",
], $buff);