Sha256: 0aa330b5a35bf2e581bce37fdaf1719f004ef7498aa5e7e359b504dd64f0d81e

Contents?: true

Size: 568 Bytes

Versions: 10

Compression:

Stored size: 568 Bytes

Contents

--FILE--
<?php
$mthaml = new MtHaml\Environment('php', array('mthaml_variable' => '$mthaml'));
$mthaml->addFilter('twig', new MtHaml\Filter\Twig(new Twig_Environment(new Twig_Loader_String())));

$source = $mthaml->compileString($parts['HAML'], "$file.haml");
$foo = '-foo-';
eval('?>'.$source);

--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/php_filters.test
guard-mthaml-0.3.1 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test
guard-mthaml-0.3.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test
guard-mthaml-0.2.5 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test
guard-mthaml-0.2.4 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test
guard-mthaml-0.2.3 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test
guard-mthaml-0.2.2 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test
guard-mthaml-0.2.1 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test
guard-mthaml-0.2.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test
guard-mthaml-0.1.0 vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test