forked from Snck3rs/contao-leaflet-maps
Fix removal of template debug markers (#114)
This commit is contained in:
@@ -31,6 +31,7 @@ use Netzmacht\LeafletPHP\Value\GeoJson\FeatureCollection;
|
|||||||
use Symfony\Component\Cache\CacheItem;
|
use Symfony\Component\Cache\CacheItem;
|
||||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as EventDispatcher;
|
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as EventDispatcher;
|
||||||
use Symfony\Contracts\Cache\CacheInterface as Cache;
|
use Symfony\Contracts\Cache\CacheInterface as Cache;
|
||||||
|
use function dd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class MapProvider.
|
* Class MapProvider.
|
||||||
@@ -399,8 +400,8 @@ class MapProvider
|
|||||||
|
|
||||||
$content = $this->templateRenderer->render($templateReference, $parameters);
|
$content = $this->templateRenderer->render($templateReference, $parameters);
|
||||||
$content = preg_replace(
|
$content = preg_replace(
|
||||||
['/^<!-- TEMPLATE (START): .+ -->\n*/', '/\n*<!-- TEMPLATE (END): .+ -->$/'],
|
['/^(\s*)<!-- TEMPLATE \(?START\)?: .+ -->\n*/', '/\n*<!-- TEMPLATE \(?END\)?: .+ -->$/'],
|
||||||
'',
|
['$1', ''],
|
||||||
$content
|
$content
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user