Sha256: 48344d3b39e5999e5f6b1cd15180b8d5d5519a35a9f36fd7ac8b26062f5a0e13

Contents?: true

Size: 578 Bytes

Versions: 10

Compression:

Stored size: 578 Bytes

Contents

<?php

namespace MtHaml\Filter;

use MtHaml\NodeVisitor\RendererAbstract as Renderer;
use MtHaml\Node\Filter;
use MtHaml\Node\EscapableAbstract;

class Escaped extends Plain
{
    public function optimize(Renderer $renderer, Filter $node, $options)
    {
        foreach ($node->getChilds() as $child) {
            foreach ($child->getContent()->getChilds() as $item) {
                if ($item instanceof EscapableAbstract) {
                    $item->getEscaping()->setEnabled(true);
                }
            }
            $child->accept($renderer);
        }
    }
}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
guard-mthaml-0.4.0 vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php
guard-mthaml-0.3.1 vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php
guard-mthaml-0.3.0 vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php
guard-mthaml-0.2.5 vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php
guard-mthaml-0.2.4 vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php
guard-mthaml-0.2.3 vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php
guard-mthaml-0.2.2 vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php
guard-mthaml-0.2.1 vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php
guard-mthaml-0.2.0 vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php
guard-mthaml-0.1.0 vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php