Skip to content

Commit 6835a43

Browse files
process_link regexp change
Change the process_link regexp to actually hide all the parts before class/method name. Please see unit tests carried out on regex101: https://regex101.com/r/eNUo8C/1
1 parent 92dbbbe commit 6835a43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinxcontrib/phpdomain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def process_link(self, env, refnode, has_explicit_title, title, target):
491491
# if the first character is a tilde, don't display the module/class
492492
# parts of the contents
493493
if title[0:1] == '~':
494-
m = re.search(r"(?:\\|[:]{2})(.*)\Z", title)
494+
m = re.search(r"(?:.+[:]{2}|(?:.*?\\{2})+)?(.*)\Z", title)
495495
if m:
496496
title = m.group(1)
497497

0 commit comments

Comments
 (0)