Merge branch 'planning_before_property_drawer'
This commit is contained in:
commit
26f1eae9a1
@ -0,0 +1,7 @@
|
|||||||
|
** Foo
|
||||||
|
DEADLINE: <2023-10-16 Mon>
|
||||||
|
:PROPERTIES:
|
||||||
|
:foo: *a*
|
||||||
|
:Bar: *b*
|
||||||
|
:BAZ: *c*
|
||||||
|
:END:
|
@ -101,11 +101,15 @@ impl<'s> Heading<'s> {
|
|||||||
_ => None,
|
_ => None,
|
||||||
})
|
})
|
||||||
.flat_map(|section| section.children.iter())
|
.flat_map(|section| section.children.iter())
|
||||||
.take(1)
|
.take_while(|element| match element {
|
||||||
.filter_map(|element| match element {
|
Element::Planning(_) | Element::PropertyDrawer(_) => true,
|
||||||
|
_ => false,
|
||||||
|
})
|
||||||
|
.find_map(|element| match element {
|
||||||
Element::PropertyDrawer(property_drawer) => Some(property_drawer),
|
Element::PropertyDrawer(property_drawer) => Some(property_drawer),
|
||||||
_ => None,
|
_ => None,
|
||||||
})
|
})
|
||||||
|
.into_iter()
|
||||||
.flat_map(|property_drawer| property_drawer.children.iter())
|
.flat_map(|property_drawer| property_drawer.children.iter())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user