Skip to content

Commit

Permalink
fix: check for disabled = true before invoking pandoc (#108)
Browse files Browse the repository at this point in the history
Allows `mdbook-pandoc` to exit successfully when `disabled = true` is set and `pandoc` is not installed
  • Loading branch information
mgeisler authored Jul 22, 2024
1 parent 81d1675 commit 7869b27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ impl mdbook::Renderer for Renderer {
);
}

let pandoc_version = pandoc::check_compatibility()?;

let cfg: Config = ctx
.config
.get_deserialized_opt(Self::CONFIG_KEY)
Expand All @@ -105,6 +103,8 @@ impl mdbook::Renderer for Renderer {
return Ok(());
}

let pandoc_version = pandoc::check_compatibility()?;

let html_cfg: Option<HtmlConfig> = ctx
.config
.get_deserialized_opt("output.html")
Expand Down

0 comments on commit 7869b27

Please sign in to comment.