Goetas\Twital\EventSubscriber\DOMMessSubscriber::fixAttributes PHP Method

fixAttributes() public method

public fixAttributes ( SourceEvent $event )
$event Goetas\Twital\EventDispatcher\SourceEvent
    public function fixAttributes(SourceEvent $event)
    {
        $event->setTemplate(preg_replace_callback('/ __attr__="(__a[0-9a-f]+)"/', function ($mch) {
            return '{% for ____ak,____av in ' . $mch[1] . ' if ____av|length>0 %} {{____ak | raw}}="{{ ____av|join(\'\') }}"{% endfor %}';
        }, $event->getTemplate()));
    }