Binding.scala icon indicating copy to clipboard operation
Binding.scala copied to clipboard

The last element in HTML interpolation are inserted twice (Binding.scala 13.x)

Open Atry opened this issue 4 years ago • 0 comments

The following test added from https://github.com/Atry/Binding.scala/commit/fc86e72526137999eed916ffea84c5fce62d9e16 fails

  "bug in todoapp" in {
    val children = html"<section>${"text"}</section><footer></footer>"
    *[Future] {
      (
        for snapshot <- !Await(children.snapshots.toLazyList)
        yield {
          for node <- snapshot.toList
          yield node.asInstanceOf[Element].outerHTML
        }.mkString
      ) should be(
        LazyList(
          "", "<footer></footer>", "<section>text</section><footer></footer>"
        )
      )
    }
  }
[info] - bug in todoapp *** FAILED ***
[info]   LazyList("", "<footer></footer>", "<section>text</section><footer></footer>", "<section>text</section><footer></footer><footer></footer>") was not equal to LazyList("", "<footer></footer>", "<section>text</section><footer></footer>") (htmlSpec.scala:48)
[info]   Analysis:
[info]   LazyList(3: <section>text</section><footer></footer><footer></footer> -> )

Atry avatar Feb 16 '22 07:02 Atry