Sha256: db5c5a5dc6cd6c684b795cea136998153d6afd23b64d1e0b2093ccea4ac8f0ec

Contents?: true

Size: 726 Bytes

Versions: 10

Compression:

Stored size: 726 Bytes

Contents

--FILE--
<?php
$mthaml = new MtHaml\Environment('twig', array('enable_escaper' => false));

$twig = new Twig_Environment(new MtHaml\Support\Twig\Loader($mthaml, new Twig_Loader_String()));
$twig->addExtension(new MtHaml\Support\Twig\Extension($mthaml));

$mthaml->addFilter('twig', new MtHaml\Filter\Twig($twig));

$source = $mthaml->compileString($parts['HAML'], "$file.haml");
twig_template_from_string($twig, $source)->display(array('foo' => '-foo-'));

--HAML--
%body
  :twig
    <p>Ahoj</p>
  :twig
    <p>#{foo}</p>
  :php
    echo "<strong>a</strong>\n";
  :php
    $x = 5;
    echo "<strong>{$x}#{foo}</strong>\n";
--EXPECT--
<body>
  <p>Ahoj</p>
  <p>-foo-</p>
  <strong>a</strong>
  <strong>5-foo-</strong>
</body>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
guard-mthaml-0.4.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test
guard-mthaml-0.3.1 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test
guard-mthaml-0.3.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test
guard-mthaml-0.2.5 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test
guard-mthaml-0.2.4 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test
guard-mthaml-0.2.3 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test
guard-mthaml-0.2.2 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test
guard-mthaml-0.2.1 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test
guard-mthaml-0.2.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test
guard-mthaml-0.1.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test