public function onAfterRenderPage(RenderEvent $event)
 {
     $id = $event->getId();
     if ($this->isExcluded($id)) {
         return;
     }
     $this->io->write('Beautifying HTML: ' . $event->getId());
     $event->setContent(\Mihaeu\HtmlFormatter::format($event->getContent()));
 }
Beispiel #2
0
 public function format($html)
 {
     return HtmlFormatter::format($html);
 }
 protected function niceHtml($content)
 {
     $content = \Mihaeu\HtmlFormatter::format((string) $content);
     return preg_replace("#\n\\s*\n#", "\n", $content);
 }