-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
I'm building a preprocessor, but it requires that I work on the markdown file that already has the links resolved, i.e. it should have the {{ #playpen }}
, {{ #include }}
, and {{ #rustdoc_include }}
already resolved. I'd like to work on Markdown files that have those include
d files in the Markdown.
Very simply it would be awesome if I could just do:
[preprocessor.links]
[preprocessor.custom]
command = "cargo run --manifest-path=../../Cargo.toml --bin mdbook-custom"
But since this creates a toml table, it would require either:
- a
depends
key in thecustom
preprocessor, like so:
[preprocessor.custom]
command = "cargo run --manifest-path=../../Cargo.toml --bin mdbook-custom"
depends-on = "links"
Note that in this hypothetical solution explicitly marking the [preprocessor.links]
would not be needed.
- Making the
preprocessor
into a list.
[[preprocessor]]
name = "links"
[[preprocessor]]
name = "custom"
command = "cargo run --manifest-path=../../Cargo.toml --bin mdbook-custom"
And after this configuration, each preprocessor would work on the book that has already been preprocessed by the preprocessors defined before it (if it is not the first).
If this is already possible, or a workaround exists please let me know (thx).