PoiScript / orgize

A Rust library for parsing org-mode files.
https://poiscript.github.io/orgize/
MIT License
289 stars 35 forks source link

Fix drawer parsing to not take headlines #35

Closed calmofthestorm closed 10 months ago

calmofthestorm commented 4 years ago

Please review after #34 .

Currently, when parsing a drawer for a node of level N, any headlines of level N + 1 will be absorbed into the drawer. This changes drawer parsing to reject headlines. For example:

* Hello
:PROPERTIES:
** World
:END:

should be parsed as two nodes. The drawer is ill-formed, and will be parsed as part of the body instead of as a drawer.

This will fix #24 .