···4343 let Program { command } = clap::Parser::parse();
4444 match command {
4545 None => mdbook().exit(emit_error!()),
4646- Some(Command::Supports { .. }) => Ok(()),
4646+ Some(Command::Supports { .. }) => {}
4747 #[cfg(feature = "_testing")]
4848 Some(Command::Describe) => {
4949- print!("{}", mdbookkit::docs::describe_preprocessor::<Config>()?);
5050- Ok(())
4949+ let desc = mdbookkit::docs::Reflect::default()
5050+ .map_type::<UrlPrefix>("String")
5151+ .describe::<Config>()?;
5252+ print!("{desc}")
5153 }
5254 }
5555+ Ok(())
5356}
54575558fn mdbook() -> Result<()> {
···532535 /// Should be a string that contains the following placeholders that will be
533536 /// filled in at build time:
534537 ///
538538+ /// - `{tree}` — will be `tree` if the generated URL is for a clickable link, or
539539+ /// `raw` if the URL is for a Markdown image
535540 /// - `{ref}` — the Git reference (tag or commit ID) resolved at build time
536541 /// - `{path}` — path to the linked file relative to repo root, without a leading `/`
537542 ///
538543 /// For example, the following configures generated links to use GitLab's format:
539544 ///
540545 /// ```toml
541541- /// repo-url-template = "https://gitlab.haskell.org/ghc/ghc/-/tree/{ref}/{path}"
546546+ /// repo-url-template = "https://gitlab.haskell.org/ghc/ghc/-/{tree}/{ref}/{path}"
542547 /// ```
543548 ///
544549 /// Note that information such as repo owner or name will not be filled in. If URLs to
···549554550555 /// Specify the canonical URL at which you deploy your book.
551556 ///
552552- /// Should be a qualified URL. For example:
557557+ /// For example:
553558 ///
554559 /// ```toml
555560 /// book-url = "https://me.github.io/my-awesome-crate/"
556561 /// ```
557562 ///
558563 /// Enables validation of hard-coded links to book pages. The preprocessor will
559559- /// warn you about links that are no longer valid (file not found) at build time.
560560- ///
561561- /// This is mainly used with mdBook's `{{#include}}` feature, where sometimes you
562562- /// have to specify full URLs because path-based links are not supported.
564564+ /// warn you about links that are no longer valid at build time.
563565 #[serde(default)]
564566 #[arg(long, value_name("URL"), verbatim_doc_comment)]
565567 book_url: Option<UrlPrefix>,
566568567569 /// Convert some paths to permalinks even if they are under `src/`.
568570 ///
569569- /// By default, links to files in your book's `src/` directory will not be transformed,
570570- /// since they are already copied to build output as static files. If you want such files
571571+ /// By default, links to files in your book's `src/` directory will not be converted,
572572+ /// since they are already copied to the output directory. If you want such files
571573 /// to always be rendered as permalinks, specify their file extensions here.
572574 ///
573575 /// For example, to use permalinks for Rust source files even if they are in the book's
···586588 always_link: Vec<String>,
587589588590 /// Exit with a non-zero status code when there are warnings.
589589- ///
590590- /// Warnings are always printed to the console regardless of this option.
591591 #[serde(default)]
592592 #[arg(long, value_enum, value_name("MODE"), default_value_t = Default::default())]
593593 fail_on_warnings: OnWarning,
+2-3
crates/mdbook-rustdoc-links/src/env.rs
···70707171 /// Directory in which to persist build cache.
7272 ///
7373- /// Setting this will enable caching. Will skip rust-analyzer if cache hits.
7373+ /// Setting this will enable caching. The preprocessor will skip running
7474+ /// rust-analyzer if cache hits.
7475 #[serde(default)]
7576 #[arg(long, value_name("PATH"), value_hint(clap::ValueHint::DirPath))]
7677 pub cache_dir: Option<PathBuf>,
77787879 /// Exit with a non-zero status code when some links fail to resolve.
7979- ///
8080- /// Warnings are always printed to the console regardless of this option.
8180 #[serde(default)]
8281 #[arg(long, value_enum, value_name("MODE"), default_value_t = Default::default())]
8382 pub fail_on_warnings: OnWarning,