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 Same-type nesting not allowed; greedy first-close wins. ^^a ^^b^^ c^^ → two adjacent Spoiler nodes around literal b.
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