From 4a367dd7e0cea457c403d727432652efe6defdce Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 9 Oct 2023 15:45:10 -0400 Subject: [PATCH] Include closing semicolon in citation reference. --- src/parser/citation_reference.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parser/citation_reference.rs b/src/parser/citation_reference.rs index 66bdafa..306f43e 100644 --- a/src/parser/citation_reference.rs +++ b/src/parser/citation_reference.rs @@ -39,10 +39,12 @@ pub(crate) fn citation_reference<'b, 'g, 'r, 's>( 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 without_closing_semi_remaining = remaining; + let (remaining, _closing_semi) = opt(tag(";"))(remaining)?; let source = get_consumed(input, remaining); Ok(( - remaining, + without_closing_semi_remaining, CitationReference { source: source.into(), key: key.into(),