Implement the new fields for keywords.
This commit is contained in:
@@ -58,6 +58,7 @@ fn _filtered_keyword<'s, F: Fn(OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s
|
||||
affiliated_keywords: AffiliatedKeywords::default(), // To be populated by the caller if this keyword is in a context to support affiliated keywords.
|
||||
key: parsed_key.into(),
|
||||
value: "",
|
||||
post_blank: None,
|
||||
},
|
||||
));
|
||||
}
|
||||
@@ -71,6 +72,7 @@ fn _filtered_keyword<'s, F: Fn(OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s
|
||||
affiliated_keywords: AffiliatedKeywords::default(), // To be populated by the caller if this keyword is in a context to support affiliated keywords.
|
||||
key: parsed_key.into(),
|
||||
value: parsed_value.into(),
|
||||
post_blank: None,
|
||||
},
|
||||
))
|
||||
}
|
||||
@@ -89,12 +91,13 @@ where
|
||||
AK: IntoIterator<Item = Keyword<'s>>,
|
||||
{
|
||||
let (remaining, mut kw) = filtered_keyword(regular_keyword_key)(remaining)?;
|
||||
let (remaining, _trailing_ws) =
|
||||
let (remaining, post_blank) =
|
||||
maybe_consume_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
let source = get_consumed(input, remaining);
|
||||
kw.affiliated_keywords =
|
||||
parse_affiliated_keywords(context.get_global_settings(), affiliated_keywords);
|
||||
kw.source = Into::<&str>::into(source);
|
||||
kw.post_blank = post_blank.map(Into::<&str>::into);
|
||||
Ok((remaining, kw))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user