Skip to content

Commit

Permalink
disable html compressor (bis) until fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Jan 28, 2024
1 parent d92e712 commit 23a5cac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 1 addition & 6 deletions packages/core/src/templates/base.html.twig
Expand Up @@ -44,12 +44,7 @@
{% endblock %}

{% block feed %}
<link
rel="alternate"
type="application/rss+xml"
href="{{ apps.get().baseUrl|default('') }}/feed.xml"
title="{{ apps.get().name|default('') }} &raquo; {{ 'feed.alternate_title'|trans }}"
/>
<link rel="alternate" type="application/rss+xml" href="{{ apps.get().baseUrl|default('') }}/feed.xml" title="{{ apps.get().name|default('') }} &raquo; {{ 'feed.alternate_title'|trans }}" />
{% endblock %}

{% block robots %}{% endblock %}
Expand Down
4 changes: 3 additions & 1 deletion packages/static-generator/src/Generator/HtmlCompressor.php
Expand Up @@ -10,6 +10,8 @@ public static function compress(string $html): string
{
// TODO wait for https://github.com/voku/simple_html_dom/pull/106 be merged to restor html compressor with PHP 8.3
// and remove package https://github.com/devteam-emroc/simple_html_dom in base and core
return HtmlCompressorFactory::construct()->compress($html);
$html = preg_replace('/<!--(.*?)-->/s', '', $html);

return $html; // return HtmlCompressorFactory::construct()->compress($html);

Check failure on line 15 in packages/static-generator/src/Generator/HtmlCompressor.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.2 - prefer-stable - ubuntu-latest

Method Pushword\StaticGenerator\Generator\HtmlCompressor::compress() should return string but returns string|null.

Check failure on line 15 in packages/static-generator/src/Generator/HtmlCompressor.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.3 - prefer-stable - ubuntu-latest

Method Pushword\StaticGenerator\Generator\HtmlCompressor::compress() should return string but returns string|null.

Check failure on line 15 in packages/static-generator/src/Generator/HtmlCompressor.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.2 - prefer-stable - ubuntu-latest

Method Pushword\StaticGenerator\Generator\HtmlCompressor::compress() should return string but returns string|null.

Check failure on line 15 in packages/static-generator/src/Generator/HtmlCompressor.php

View workflow job for this annotation

GitHub Actions / PHPStan - P8.3 - prefer-stable - ubuntu-latest

Method Pushword\StaticGenerator\Generator\HtmlCompressor::compress() should return string but returns string|null.
}
}

0 comments on commit 23a5cac

Please sign in to comment.