diff options
Diffstat (limited to 'src/doc.rs')
-rw-r--r-- | src/doc.rs | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -526,7 +526,12 @@ impl Document { for scenario in scenarios { for step in scenario.steps() { for captured in step.parts() { - if let PartialStep::CapturedText { name, text } = captured { + if let PartialStep::CapturedText { + name, + text, + kind: _, + } = captured + { if matches!(step.types().get(name.as_str()), Some(CaptureType::File)) && !filenames.contains(&text.to_lowercase()) { @@ -562,7 +567,12 @@ impl Document { for scenario in scenarios { for step in scenario.steps() { for captured in step.parts() { - if let PartialStep::CapturedText { name, text } = captured { + if let PartialStep::CapturedText { + name, + text, + kind: _, + } = captured + { if matches!(step.types().get(name.as_str()), Some(CaptureType::File)) { filenames.remove(&text.to_lowercase()); } @@ -607,10 +617,15 @@ impl Document { } /// Typeset a Subplot document. - pub fn typeset(&mut self, warnings: &mut Warnings) { + pub fn typeset( + &mut self, + warnings: &mut Warnings, + template: Option<&str>, + ) -> Result<(), SubplotError> { for md in self.markdowns.iter_mut() { - warnings.push_all(md.typeset(self.style.clone(), self.meta.bindings())); + warnings.push_all(md.typeset(self.style.clone(), template, self.meta.bindings())); } + Ok(()) } /// Return all scenarios in a document. |