File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 44
55## Unreleased: pdoc next
66
7+ - Fix linking of identifiers that contain unicode characters.
8+ ([ #831 ] ( https://github.com/mitmproxy/pdoc/issues/831 ) , @iFreilicht )
79
810## 2025-06-04: pdoc 15.0.4
911
Original file line number Diff line number Diff line change @@ -408,23 +408,23 @@ def linkify_repl(m: re.Match):
408408 # First part of the identifier (e.g. "foo") - this is optional for relative references.
409409 (?:
410410 \b
411- (?!\d)[a-zA-Z0-9_] +
411+ (?!\d)\w +
412412 |
413413 \.* # We may also start with multiple dots.
414414 )
415415 # Rest of the identifier (e.g. ".bar" or "..bar")
416416 (?:
417417 # A single dot or a dot surrounded with pygments highlighting.
418418 (?:\.|</span><span\ class="o">\.</span><span\ class="n">)
419- (?!\d)[a-zA-Z0-9_] +
419+ (?!\d)\w +
420420 )+
421421 (?:\(\)|\b(?!\(\))) # we either end on () or on a word boundary.
422422 (?!</a>) # not an existing link
423423 (?![/#]) # heuristic: not part of a URL
424424
425425 | # Part 2: `foo` or `foo()`. `foo.bar` is already covered with part 1.
426426 (?<=<code>)
427- (?!\d)[a-zA-Z0-9_] +
427+ (?!\d)\w +
428428 (?:\(\))?
429429 (?=</code>(?!</a>))
430430 """ ,
Original file line number Diff line number Diff line change @@ -1697,7 +1697,7 @@ <h6 id="be-careful">Be Careful!</h6>
16971697 < div class ="docstring "> < p > The following link should be created properly:</ p >
16981698
16991699< ul >
1700- < li > < code > MötörCrüe.créer_naïveté</ code > </ li >
1700+ < li > < code > < a href =" # MötörCrüe.créer_naïveté" > MötörCrüe.créer_naïveté </ a > </ code > </ li >
17011701</ ul >
17021702</ div >
17031703
You can’t perform that action at this time.
0 commit comments