feat: support top-level properties drawer (#78)

This commit is contained in:
PoiScript 2024-05-09 16:41:43 +08:00
parent 2f31fd4b10
commit 9b8aec02a4
No known key found for this signature in database
GPG key ID: 22C2B1249D99985E
5 changed files with 31 additions and 9 deletions

View file

@ -57,6 +57,9 @@ impl Document {
pub fn first_headline(&self) -> Option<Headline> {
support::child(&self.syntax)
}
pub fn properties(&self) -> Option<PropertyDrawer> {
support::child(&self.syntax)
}
pub fn last_headline(&self) -> Option<Headline> {
super::last_child(&self.syntax)
}