Updated analytics layout

This commit is contained in:
Julian Prieber 2022-06-08 16:38:52 +02:00
parent af284a58c2
commit 75d7e84567
1 changed files with 10 additions and 3 deletions

View File

@ -1,7 +1,14 @@
<!-- Analytics -->
<?php
$analyticsHTML = Config::get('meta.analytics');
$analyticsHTML = preg_replace("~<!--(.*?)-->~s", "", $analyticsHTML);
echo $analyticsHTML;
$analyticsHTML = preg_replace('/[ \t]+/', ' ', preg_replace('/\s\S*$^\s\S*/m', "\n", $analyticsHTML));
$analyticsHTML = trim($analyticsHTML);
?>
@if(preg_replace( "/\r|\n/", "", $analyticsHTML ) != '')
<!-- Analytics -->
{!! $analyticsHTML !!}
<!-- /Analytics -->
@endif