Sha256: 19beaf4441fd707518f665a02b4c33738e545a5de1a4d011847e0fcd0075642a

Contents?: true

Size: 1.21 KB

Versions: 10

Compression:

Stored size: 1.21 KB

Contents

--HAML--
%html
  %body
    <p>
    %p = "foo"
    - if foo
      #id{:foo => "bar #{baz}", "z #{z}" => x}
        bar #{baz}
        = baz
    - else
      .class(a="b #{f}" c=d)
        bar
        = baz
    %p != "foo"
    %p &= "bar"
--FILE--
$visitor = new \MtHaml\NodeVisitor\Midblock('/else/A');
$node->accept($visitor);
$visitor = new \MtHaml\NodeVisitor\Escaping(\MtHaml\NodeVisitor\Escaping::ESCAPE_TRUE, \MtHaml\NodeVisitor\Escaping::ESCAPE_TRUE);
$node->accept($visitor);
--EXPECT--
root(
  tag(html
    tag(body
      interpolated(text(!<p>))
      tag(p insert(&"foo"))
      run(if foo
        tag(div
          attr(text(&id)text(&id))
          attr(text(&foo)interpolated(text(&bar )insert(&baz)))
          attr(interpolated(text(&z )insert(&z))insert(&x))
          interpolated(text(!bar )insert(&baz))
          insert(&baz)
        )
        midblock(
          run(else
            tag(div
              attr(text(&class)text(&class))
              attr(text(&a)interpolated(text(&b )insert(&f)))
              attr(text(&c)insert(&d))
              interpolated(text(!bar))
              insert(&baz)
            )
          )
        )
      )
      tag(p insert(!"foo"))
      tag(p insert(&"bar"))
    )
  )
)

Version data entries

10 entries across 10 versions & 1 rubygems

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