Sha256: 555dae2b9fd9c8d1e59890acbe1956b6bfd7bdae6a9bd70ccbc14be5025b11e7

Contents?: true

Size: 1.06 KB

Versions: 10

Compression:

Stored size: 1.06 KB

Contents

--FILE--
<?php
$env = new MtHaml\Environment('twig', array('enable_escaper' => false));
echo $env->compileString($parts['HAML'], "$file.haml");

--HAML--
%html
  :javascript
    if (foo) {
        alert(bar);
    }
  :css
    body {
            border: 1px;
                    }
  :plain
            text & <strong>strong</strong> \#{foo} #{foo} {{ foo }}
    text
  :preserve
    foo #{foo}
    bar
  :escaped
            text & <strong class="error">strong</strong> \#{foo} #{foo} {{ foo }}
  :cdata
    a < b && a < 0
--EXPECT--
<html>
  <script type="text/javascript">
  //<![CDATA[
    if (foo) {
        alert(bar);
    }
  //]]>
  </script>
  <style type="text/css">
  /*<![CDATA[*/
    body {
            border: 1px;
                    }
  /*]]>*/
  </style>
          text & <strong>strong</strong> #{foo} {% line 11 %}{{ foo }} {{ '{{' }} foo }}
  text
foo {% line 14 %}{{ foo }}
bar
          text &amp; &lt;strong class=&quot;error&quot;&gt;strong&lt;/strong&gt; #{foo} {% line 17 %}{{ (foo)|escape }} {{ '{{' }} foo }}
  <![CDATA[
    a < b && a < 0
  ]]>
</html>

Version data entries

10 entries across 10 versions & 1 rubygems

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