GitHub

File tree

  • src/mkdocstrings_handlers/python/_internal

Original file line numberDiff line numberDiff line change

@@ -190,7 +190,7 @@ def do_format_signature(

190190

# To fix this, we replace the CSS class in the first span with `nf`,

191191

# unless we already found an `nf` span.

192192

if not re.search(r'<span class="nf">', signature):

193-

signature = re.sub(r'<span class="[a-z]+">', '<span class="nf">', signature, count=1)

193+

signature = re.sub(r'<span class="[a-z]{1,2}">', '<span class="nf">', signature, count=1)

194194
195195

if stash := env.filters["stash_crossref"].stash:

196196

for key, value in stash.items():

Read the original on github.com ↗