Skip to content

Commit b6c648f

Browse files
committed
feat: Add doc-signature CSS class to separate signature code blocks
1 parent 8f0ade2 commit b6c648f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/mkdocstrings_handlers/python/rendering.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,14 @@ def do_format_signature(
104104
template = env.get_template("signature.html")
105105
signature = template.render(context.parent, function=function)
106106
signature = _format_signature(callable_path, signature, line_length)
107-
return str(env.filters["highlight"](signature, language="python", inline=False))
107+
return str(
108+
env.filters["highlight"](
109+
signature,
110+
language="python",
111+
inline=False,
112+
classes=["doc-signature"],
113+
),
114+
)
108115

109116

110117
@pass_context
@@ -142,6 +149,7 @@ def do_format_attribute(
142149
Markup.escape(signature),
143150
language="python",
144151
inline=False,
152+
classes=["doc-signature"],
145153
),
146154
)
147155

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy