From 2046603d01f2b313319f1881cfb04154bafc92b5 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 15 Dec 2023 19:42:43 -0500 Subject: [PATCH] Fix handling post blank for org documents. --- .../sections_and_headings/document_post_blank.org | 5 +++++ src/types/document.rs | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 org_mode_samples/sections_and_headings/document_post_blank.org diff --git a/org_mode_samples/sections_and_headings/document_post_blank.org b/org_mode_samples/sections_and_headings/document_post_blank.org new file mode 100644 index 00000000..a473d617 --- /dev/null +++ b/org_mode_samples/sections_and_headings/document_post_blank.org @@ -0,0 +1,5 @@ +* foo + + + + diff --git a/src/types/document.rs b/src/types/document.rs index 837b7415..e39e19cb 100644 --- a/src/types/document.rs +++ b/src/types/document.rs @@ -68,10 +68,7 @@ impl<'s> StandardProperties<'s> for Document<'s> { } fn get_post_blank(&self) -> PostBlank { - self.into_iter() - .last() - .map(|child| child.get_post_blank()) - .unwrap_or(0) + 0 } }