You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guide/src/format/configuration/preprocessors.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,8 +59,8 @@ command = "python random.py"
59
59
60
60
### Require A Certain Order
61
61
62
-
The order in which preprocessors are run is not guaranteed, but you can request some to run before or after others.
63
-
For example, suppose you want your `linenos` preprocessor to process lines that may have been `{{#include}}`d; then you want it to run after the built-in `links` preprocessor, which you can require using the `before`and/or `after`fields.
62
+
The order in which preprocessors are run can be controlled with the `before` and `after` fields.
63
+
For example, suppose you want your `linenos` preprocessor to process lines that may have been `{{#include}}`d; then you want it to run after the built-in `links` preprocessor, which you can require using either the `before` or `after`field:
64
64
65
65
```toml
66
66
[preprocessor.linenos]
@@ -74,7 +74,7 @@ or
74
74
before = [ "linenos" ]
75
75
```
76
76
77
-
It would be possible, though redundant, to specify both of the above in the same config file.
77
+
It would also be possible, though redundant, to specify both of the above in the same config file.
78
78
79
-
`mdbook` will detect any infinite loops and error out.
80
-
Note that order of preprocessors besides what is specified using `before`and `after` is not guaranteed, and may change within the same run of `mdbook`.
79
+
Preprocessors having the same priority specified through `before`and `after` are sorted by name.
80
+
Any infinite loops will be detected and produce an error.
0 commit comments