Skip to content

Commit 6f79be0

Browse files
committed
fix: Normalize spaces to underscores when passing object to rendering context using its kind as key
Issue-mkdocstrings-791: mkdocstrings/mkdocstrings#791
1 parent 30d4ba2 commit 6f79be0

File tree

1 file changed

+1
-1
lines changed
  • src/mkdocstrings_handlers/python/_internal

1 file changed

+1
-1
lines changed

src/mkdocstrings_handlers/python/_internal/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def render(self, data: CollectorItem, options: PythonOptions, locale: str | None
295295
return template.render(
296296
**{
297297
"config": options,
298-
data.kind.value: data,
298+
data.kind.value.replace(" ", "_"): data,
299299
# Heading level is a "state" variable, that will change at each step
300300
# of the rendering recursion. Therefore, it's easier to use it as a plain value
301301
# than as an item in a dictionary.

0 commit comments

Comments
 (0)