-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] I'd like to specify the order of preprocessors #1172
Comments
Ok, this is embarassing. I gave the wrong path for the file, that's why it wasn't included. It now behaves as expected. Sorry. Anyway, I guess in theory, if there was a lot of custom preprocessors (since it seems like you hardcoded |
I kinda want this too, but as a workaround, preprocessors seem to be run alphabetically, so:
works. From looking at the source code, seems that depending on what the feature solver determines, preprocessors may run in alphabetical order (default) or in the order they appear in the TOML file (if the |
I can suggest several options:
|
That's topological sorting, as implemented by e.g. the topological-sort crate, isn't it? |
I'm interested in this as well but the opposite which makes this issue relevant. I want to create dynamic content that includes another file like this: Chapter::new(
"Chapter 1",
"{{ #include some_chapter.md }}".into(),
std::path::PathBuf::from("chapter_1.md"),
vec![],
); But since the |
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 thoseinclude
d files in the Markdown.Very simply it would be awesome if I could just do:
But since this creates a toml table, it would require either:
depends
key in thecustom
preprocessor, like so:Note that in this hypothetical solution explicitly marking the
[preprocessor.links]
would not be needed.preprocessor
into a list.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).
The text was updated successfully, but these errors were encountered: