From e69d14b3f3ea6a49b4a7717218f2f635411724bb Mon Sep 17 00:00:00 2001 From: Elena Krippner Date: Tue, 19 Dec 2023 15:14:40 +0100 Subject: [PATCH] don't start the citeproc processor if the input doesn't contain citations --- render/src/render.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/render/src/render.rs b/render/src/render.rs index 1ae9da2c..aacc9e11 100644 --- a/render/src/render.rs +++ b/render/src/render.rs @@ -55,6 +55,14 @@ impl<'a> Context<'a> { } fn new(doc: &'a Document, format: OutputFormatKind) -> Self { + if doc.citations.is_empty() { + return Context { + doc, + rendered_citations: vec![], + footnotes: "".to_string(), + bibliography: "".to_string(), + }; + } let rendered_citations: Vec; let footnotes: String; let bibliography: String;