--FILE-- 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
Ahoj
:twig#{foo}
:php echo "a\n"; :php $x = 5; echo "{$x}#{foo}\n"; --EXPECT--Ahoj
-foo-
a 5-foo-