Sha256: 3679ee1ea88c6343effe5aed68ead5328bec78aa14e8972235739020d66af3e9

Contents?: true

Size: 1.35 KB

Versions: 10

Compression:

Stored size: 1.35 KB

Contents

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

--HAML--

%p(foo="bar" #{test})
%p(#{test} foo="bar")
%p(#{test})
%p(bar="baz" #{test} foo="bar")
%p(bar="baz" #{test} class="abc #{def}")

%p{:foo=>"bar", #{test}}
%p{#{test}, :foo=>"bar"}
%p{#{test}}
%p{:bar=>"baz", #{test}, :foo=>"bar"}
%p{:bar=>"baz", #{test}, :class=>"abc #{def}"}

--EXPECT--
<p foo="bar" <?php echo htmlspecialchars(test,ENT_QUOTES,'UTF-8'); ?>></p>
<p <?php echo htmlspecialchars(test,ENT_QUOTES,'UTF-8'); ?> foo="bar"></p>
<p <?php echo htmlspecialchars(test,ENT_QUOTES,'UTF-8'); ?>></p>
<p bar="baz" <?php echo htmlspecialchars(test,ENT_QUOTES,'UTF-8'); ?> foo="bar"></p>
<p <?php echo MtHaml\Runtime::renderAttributes(array(array('bar', 'baz'), MtHaml\Runtime\AttributeInterpolation::create(test), array('class', ('abc ' . def))), 'html5', 'UTF-8'); ?>></p>
<p foo="bar" <?php echo htmlspecialchars(test,ENT_QUOTES,'UTF-8'); ?>></p>
<p <?php echo htmlspecialchars(test,ENT_QUOTES,'UTF-8'); ?> foo="bar"></p>
<p <?php echo htmlspecialchars(test,ENT_QUOTES,'UTF-8'); ?>></p>
<p bar="baz" <?php echo htmlspecialchars(test,ENT_QUOTES,'UTF-8'); ?> foo="bar"></p>
<p <?php echo MtHaml\Runtime::renderAttributes(array(array('bar', 'baz'), MtHaml\Runtime\AttributeInterpolation::create(test), array('class', ('abc ' . def))), 'html5', 'UTF-8'); ?>></p>

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