@@ -8,27 +8,8 @@ use tracing::{debug, trace, warn};
8
8
9
9
/// A custom preprocessor which will shell out to a 3rd-party program.
10
10
///
11
- /// # Preprocessing Protocol
12
- ///
13
- /// When the `supports_renderer()` method is executed, `CmdPreprocessor` will
14
- /// execute the shell command `$cmd supports $renderer`. If the renderer is
15
- /// supported, custom preprocessors should exit with a exit code of `0`,
16
- /// any other exit code be considered as unsupported.
17
- ///
18
- /// The `run()` method is implemented by passing a `(PreprocessorContext, Book)`
19
- /// tuple to the spawned command (`$cmd`) as JSON via `stdin`. Preprocessors
20
- /// should then "return" a processed book by printing it to `stdout` as JSON.
21
- /// For convenience, the `CmdPreprocessor::parse_input()` function can be used
22
- /// to parse the input provided by `mdbook`.
23
- ///
24
- /// Exiting with a non-zero exit code while preprocessing is considered an
25
- /// error. `stderr` is passed directly through to the user, so it can be used
26
- /// for logging or emitting warnings if desired.
27
- ///
28
- /// # Examples
29
- ///
30
- /// An example preprocessor is available in this project's `examples/`
31
- /// directory.
11
+ /// See <https://rust-lang.github.io/mdBook/for_developers/preprocessors.html>
12
+ /// for a description of the preprocessor protocol.
32
13
#[ derive( Debug , Clone , PartialEq ) ]
33
14
pub struct CmdPreprocessor {
34
15
name : String ,
0 commit comments