section-nesting

Level-2 heading opens a child Section inside a level-1 Section

§4.2 · source

Input

= Title

Some paragraph.

== Sub A

Content A.

Output AST

- type: Section
  level: 1
  heading:
    - type: Text
      value: Title
  children:
    - type: Paragraph
      children:
        - type: Text
          value: Some paragraph.
    - type: Section
      level: 2
      heading:
        - type: Text
          value: Sub A
      children:
        - type: Paragraph
          children:
            - type: Text
              value: Content A.