Skip to content

Commit 3102636

Browse files
Intersphinx role, simplify role_name check
Co-authored-by: Takeshi KOMIYA <i.tkomiya@gmail.com>
1 parent 8583dc3 commit 3102636

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinx/ext/intersphinx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ class IntersphinxDispatcher(CustomReSTDispatcher):
478478

479479
def role(self, role_name: str, language_module: ModuleType, lineno: int, reporter: Reporter
480480
) -> Tuple[RoleFunction, List[system_message]]:
481-
if len(role_name) > 9 and role_name.startswith('external') and role_name[8] in ':+':
481+
if len(role_name) > 9 and role_name.startswith(('external:', 'external+')):
482482
return IntersphinxRole(role_name), []
483483
else:
484484
return super().role(role_name, language_module, lineno, reporter)

0 commit comments

Comments
 (0)