spoiler-same-type-nesting

Same-type nesting not allowed; greedy first-close wins. ^^a ^^b^^ c^^ → two adjacent Spoiler nodes around literal b.

§5.12 · source

Input

^^a ^^b^^ c^^

Output AST

- type: Paragraph
  children:
    - type: Spoiler
      children:
        - type: Text
          value: a
    - type: Text
      value: b
    - type: Spoiler
      children:
        - type: Text
          value: c