Populate the name field on elements.

This commit is contained in:
Tom Alexander
2023-10-04 21:21:26 -04:00
parent 5b308ea76f
commit 93fe46e4e7
15 changed files with 73 additions and 28 deletions

View File

@@ -13,6 +13,7 @@ use nom::sequence::tuple;
use super::keyword::affiliated_keyword;
use super::org_source::OrgSource;
use super::util::get_name;
use super::util::include_input;
use super::util::WORD_CONSTITUENT_CHARACTERS;
use crate::context::parser_with_context;
@@ -87,7 +88,7 @@ pub(crate) fn footnote_definition<'b, 'g, 'r, 's>(
remaining,
FootnoteDefinition {
source: source.into(),
name: None, // TODO
name: get_name(&affiliated_keywords),
label: lbl.into(),
children: children.into_iter().map(|(_, item)| item).collect(),
},