summaryrefslogtreecommitdiffstats
path: root/src/preprocessor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/preprocessor.rs')
-rw-r--r--src/preprocessor.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/preprocessor.rs b/src/preprocessor.rs
index 99141e7..30f53d3 100644
--- a/src/preprocessor.rs
+++ b/src/preprocessor.rs
@@ -8,7 +8,7 @@ use mdbook::{
use crate::{
book_config::{admonish_config_from_context, Config, RenderMode},
markdown::preprocess,
- types::RenderTextMode,
+ types::{CustomDirectiveMap, RenderTextMode},
};
pub struct Admonish;
@@ -22,6 +22,8 @@ impl Preprocessor for Admonish {
let config = admonish_config_from_context(ctx)?;
ensure_compatible_assets_version(&config)?;
+ let custom_directives =
+ CustomDirectiveMap::from_configs(config.custom.into_iter().map(Into::into));
let on_failure = config.on_failure;
let admonition_defaults = config.default;
@@ -57,6 +59,7 @@ impl Preprocessor for Admonish {
&chapter.content,
on_failure,
&admonition_defaults,
+ &custom_directives,
render_text_mode,
)
.map(|md| {