Sha256: 173345bb8ed7e98b977b53513fcd279482126503c2dc3122c5cf6adcaea53d67
Contents?: true
Size: 988 Bytes
Versions: 10
Compression:
Stored size: 988 Bytes
Contents
--FILE-- <?php $env = new MtHaml\Environment('php', array('enable_escaper' => false, 'mthaml_variable' => '$mthaml')); echo $env->compileString($parts['HAML'], "$file.haml"); --HAML-- #php :php echo $a; :php foreach (array(#{var_export(foo, true)}) as $item) { } #twig :twig {{ foo|filter }} {% for i in 1..5 %} {{ "- \#{i}" }} {% endfor %} :twig {{ #{$foo}|filter }} --EXPECT-- <div id="php"> <?php echo $a; ?> <?php echo MtHaml\Runtime::filter($mthaml, 'php', get_defined_vars(), ('foreach (array(' . (var_export(foo, true)) . ') as $item) {'). "\n" . '}'. "\n" ) ?> </div> <div id="twig"> <?php echo MtHaml\Runtime::filter($mthaml, 'twig', get_defined_vars(), '{{ foo|filter }}'. "\n" . '{% for i in 1..5 %}'. "\n" . ' {{ "- #{i}" }}'. "\n" . '{% endfor %}'. "\n" ) ?> <?php echo MtHaml\Runtime::filter($mthaml, 'twig', get_defined_vars(), ('{{ ' . $foo . '|filter }}'). "\n" ) ?> </div>
Version data entries
10 entries across 10 versions & 1 rubygems