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()));
 }
Exemplo n.º 2
0
 public function format($html)
 {
     return HtmlFormatter::format($html);
 }
Exemplo n.º 3
0
 protected function niceHtml($content)
 {
     $content = \Mihaeu\HtmlFormatter::format((string) $content);
     return preg_replace("#\n\\s*\n#", "\n", $content);
 }