caption-namedblock-basic

A ^ line immediately after a NamedBlock closing ::: sets caption on the NamedBlock node

§6.2 · source

Input

:::box
Some content here.
:::
^ Box caption text

Output AST

- type: NamedBlock
  name: box
  caption:
    - type: Text
      value: Box caption text
  children:
    - type: Paragraph
      children:
        - type: Text
          value: Some content here.