caption-scope-local-inside-namedblock

Caption binding is scope-local: a ^ inside a NamedBlock binds to the last captionable child in that scope; a ^ after the closing ::: binds to the NamedBlock itself

§6.2

Input

:::figure
  ![alt](photo.jpg)
  ^ Inner image caption
:::
^ Named block caption

Output AST

- type: NamedBlock
  name: figure
  caption:
    - type: Text
      value: Named block caption
  children:
    - type: ImageBlock
      alt:
        - type: Text
          value: alt
      src: photo.jpg
      caption:
        - type: Text
          value: Inner image caption