From 769a926691c970ccb8ea0f8efe7d34cc9442576f Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Wed, 2 Jun 2021 11:59:12 -0400 Subject: [PATCH] Correct documentation of on_pre_template event. The behavior of this event has never changed. The documentation was simply incorrect. Fixes #2308. --- docs/dev-guide/plugins.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/dev-guide/plugins.md b/docs/dev-guide/plugins.md index efbda3ae..38130719 100644 --- a/docs/dev-guide/plugins.md +++ b/docs/dev-guide/plugins.md @@ -250,15 +250,15 @@ called after the [env] event and before any [page events]. ##### on_pre_template : The `pre_template` event is called immediately after the subject template is - loaded and can be used to alter the content of the template. + loaded and can be used to alter the template. Parameters: - : __template__: the template contents as string + : __template__: a Jinja2 [Template] object : __template_name__: string filename of template : __config:__ global configuration object Returns: - : template contents as string + : a Jinja2 [Template] object ##### on_template_context @@ -487,3 +487,4 @@ tell MkDocs to use it via the config. [on_build_error]: #on_build_error [Handling Errors]: #handling-errors [config_scheme]: #config_scheme +[Template]: http://code.nabla.net/doc/jinja2/api/jinja2/environment/jinja2.environment.Template.html