Populate citation reference properties.
This commit is contained in:
@@ -33,10 +33,10 @@ pub(crate) fn citation_reference<'b, 'g, 'r, 's>(
|
||||
context: RefContext<'b, 'g, 'r, 's>,
|
||||
input: OrgSource<'s>,
|
||||
) -> Res<OrgSource<'s>, CitationReference<'s>> {
|
||||
let (remaining, _prefix) =
|
||||
let (remaining, prefix) =
|
||||
must_balance_bracket(opt(parser_with_context!(key_prefix)(context)))(input)?;
|
||||
let (remaining, _key) = parser_with_context!(citation_reference_key)(context)(remaining)?;
|
||||
let (remaining, _suffix) =
|
||||
let (remaining, key) = parser_with_context!(citation_reference_key)(context)(remaining)?;
|
||||
let (remaining, suffix) =
|
||||
must_balance_bracket(opt(parser_with_context!(key_suffix)(context)))(remaining)?;
|
||||
let source = get_consumed(input, remaining);
|
||||
|
||||
@@ -44,6 +44,9 @@ pub(crate) fn citation_reference<'b, 'g, 'r, 's>(
|
||||
remaining,
|
||||
CitationReference {
|
||||
source: source.into(),
|
||||
key: key.into(),
|
||||
prefix: prefix.unwrap_or(Vec::new()),
|
||||
suffix: suffix.unwrap_or(Vec::new()),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user