1
Fork 0

Upgrade dependencies and fix clap breakage

Fix #30
This commit is contained in:
Jan-Erik Rediger 2022-12-15 20:54:11 +01:00
parent 0ceab3dc7e
commit 2300bdbc45
3 changed files with 305 additions and 308 deletions

601
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -13,10 +13,10 @@ rust-version = "1.58"
mdbook = "0.4.21"
pulldown-cmark = "0.9.1"
log = "0.4.11"
clap = "3.1.18"
clap = { version = "4.0.29", features = ["cargo"] }
serde_json = "1.0.57"
toml = "0.5.6"
toml = "0.5.10"
[dev-dependencies]
pretty_assertions = "1.0.0"
env_logger = "0.9.0"
env_logger = "0.10.0"

View file

@ -11,7 +11,7 @@ use mdbook_toc::Toc;
use std::io;
use std::process;
pub fn make_app() -> Command<'static> {
pub fn make_app() -> Command {
Command::new("mdbook-toc")
.version(crate_version!())
.about("mdbook preprocessor to add Table of Contents")
@ -52,7 +52,9 @@ fn handle_preprocessing() -> Result<(), Error> {
}
fn handle_supports(sub_args: &ArgMatches) -> ! {
let renderer = sub_args.value_of("renderer").expect("Required argument");
let renderer = sub_args
.get_one::<String>("renderer")
.expect("Required argument");
let supported = Toc.supports_renderer(&renderer);
// Signal whether the renderer is supported by exiting with 1 or 0.