krz/orgo

Lightning fast org-mode static site generator.

clone: git clone https://gitbay.org/krz/orgo.git

v0.20.0: tests/snapshots/constructs__headings_element_tree.snap · raw

  1---
  2source: tests/constructs.rs
  3expression: "parse_fixture(\"headings.org\").root"
  4---
  5{
  6  "heading": null,
  7  "content": [
  8    {
  9      "Keyword": {
 10        "key": "TITLE",
 11        "value": "Heading Metadata"
 12      }
 13    }
 14  ],
 15  "children": [
 16    {
 17      "heading": {
 18        "level": 1,
 19        "todo": {
 20          "name": "TODO",
 21          "done": false
 22        },
 23        "priority": "A",
 24        "title": [
 25          {
 26            "Text": "Write the parser"
 27          }
 28        ],
 29        "tags": [
 30          "work",
 31          "rust"
 32        ],
 33        "properties": {
 34          "entries": [
 35            [
 36              "CUSTOM_ID",
 37              "write-parser"
 38            ],
 39            [
 40              "OWNER",
 41              "nobody"
 42            ]
 43          ]
 44        },
 45        "id": null,
 46        "custom_id": "write-parser"
 47      },
 48      "content": [
 49        {
 50          "Paragraph": [
 51            {
 52              "Text": "A heading carrying a keyword, a priority, tags and a property drawer."
 53            }
 54          ]
 55        }
 56      ],
 57      "children": [
 58        {
 59          "heading": {
 60            "level": 2,
 61            "todo": {
 62              "name": "DONE",
 63              "done": true
 64            },
 65            "priority": null,
 66            "title": [
 67              {
 68                "Text": "Nested and finished"
 69              }
 70            ],
 71            "tags": [],
 72            "properties": {
 73              "entries": []
 74            },
 75            "id": null,
 76            "custom_id": null
 77          },
 78          "content": [
 79            {
 80              "Paragraph": [
 81                {
 82                  "Text": "Sub-headings nest by star count."
 83                }
 84              ]
 85            }
 86          ],
 87          "children": []
 88        },
 89        {
 90          "heading": {
 91            "level": 2,
 92            "todo": null,
 93            "priority": "C",
 94            "title": [
 95              {
 96                "Text": "Priority without a keyword"
 97              }
 98            ],
 99            "tags": [],
100            "properties": {
101              "entries": []
102            },
103            "id": null,
104            "custom_id": null
105          },
106          "content": [
107            {
108              "Paragraph": [
109                {
110                  "Text": "A priority cookie can stand alone."
111                }
112              ]
113            }
114          ],
115          "children": []
116        }
117      ]
118    },
119    {
120      "heading": {
121        "level": 1,
122        "todo": null,
123        "priority": null,
124        "title": [
125          {
126            "Text": "TODOs are not a keyword"
127          }
128        ],
129        "tags": [],
130        "properties": {
131          "entries": []
132        },
133        "id": null,
134        "custom_id": null
135      },
136      "content": [
137        {
138          "Paragraph": [
139            {
140              "Text": "The word boundary matters: this heading has no TODO keyword."
141            }
142          ]
143        }
144      ],
145      "children": []
146    },
147    {
148      "heading": {
149        "level": 1,
150        "todo": {
151          "name": "DONE",
152          "done": true
153        },
154        "priority": null,
155        "title": [],
156        "tags": [],
157        "properties": {
158          "entries": []
159        },
160        "id": null,
161        "custom_id": null
162      },
163      "content": [
164        {
165          "Paragraph": [
166            {
167              "Text": "A keyword with no title at all."
168            }
169          ]
170        }
171      ],
172      "children": []
173    }
174  ]
175}