for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PiedWeb\CMSBundle\Utils;
class HtmlBeautifer
{
public static function removeHtmlComments(string $content)
return preg_replace('/<!--(.|\s)*?-->/', '', $content);
}
public static function punctuationBeautifer($text)
return str_replace(
[' ;', ' :', ' ?', ' !', '« ', ' »', '« ', ' »'],
[' ;', ' :', ' ?', ' !', '« ', ' »', '« ', ' »'],
$text
);