Do not include leading slash in citation style.
Some checks failed
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has failed
rust-test Build rust-test has failed

This commit is contained in:
Tom Alexander 2023-10-09 15:48:43 -04:00
parent 4a367dd7e0
commit 81c0b7079f
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -67,10 +67,13 @@ pub(crate) fn citation<'b, 'g, 'r, 's>(
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn citestyle<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>> {
let (remaining, _) = tuple((tag("/"), style))(input)?;
let (remaining, _) = opt(tuple((tag("/"), variant)))(remaining)?;
let source = get_consumed(input, remaining);
Ok((remaining, source))
map(
tuple((
tag("/"),
recognize(tuple((style, opt(tuple((tag("/"), variant)))))),
)),
|(_, style)| style,
)(input)
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]