Skip to content

Headers created in custom directives disappear #289

@japgolly

Description

@japgolly

Hi. Consider this custom directive:

    val demoDirective = Blocks.create("demo") {
      import Blocks.dsl._
      attribute(0).as[String].map { arg =>
        BlockSequence(
          Paragraph("before"),
          Header(1, "Arg = " + arg),
          Paragraph("after"),
        )
      }
    }

when I used it like this

# Test
# Here we go...
@:demo(hello)

for some reason the header disappears. The output is

Test
Here we go...
before

after

instead of

Test
Here we go...
before
Arg = hello
after

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions