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
Found another issue/question with what I was trying to do with a custom handler.
If one document has two identifiers that use different handlers; only the first one's env is updated. My templates error out because the default mkdocstring filters are missing (highlight, heading or convert_markdown) don't exist in the second handler yet and instead I only have the built-in jinja filters and the any filter that is added when the env is initialized.
It looks like these few lines are the offenders and I'm curious if there is a drawback to updating it every time, updating the env on init or make the _updated_env a part of the handler and not the extension? Commenting out self._updated_env = True is enough to resolve this issue.
Hey, nice catch! Indeed it does make sense to hold that _updated_env boolean at the processor level. Instead, each handler should have its own (or none, but I recall adding this check to avoid updating Jinja envs again and again). Do you want to open a PR?
Found another issue/question with what I was trying to do with a custom handler.
If one document has two identifiers that use different handlers; only the first one's env is updated. My templates error out because the default mkdocstring filters are missing (
highlight
,heading
orconvert_markdown
) don't exist in the second handler yet and instead I only have the built-in jinja filters and theany
filter that is added when theenv
is initialized.It looks like these few lines are the offenders and I'm curious if there is a drawback to updating it every time, updating the env on init or make the _updated_env a part of the handler and not the extension? Commenting out
self._updated_env = True
is enough to resolve this issue.The text was updated successfully, but these errors were encountered: