mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-14 22:49:59 -04:00
Merge branch 'compat/main/arm-sphinx' into 'main'
Make backward compatibility for older python-sphinx See merge request isc-projects/bind9!5501
This commit is contained in:
commit
3693e2aafb
1 changed files with 14 additions and 1 deletions
|
|
@ -18,7 +18,20 @@ from docutils.nodes import Node, system_message
|
|||
from docutils.parsers.rst import roles
|
||||
|
||||
from sphinx import addnodes
|
||||
from sphinx.util.docutils import ReferenceRole
|
||||
|
||||
try:
|
||||
from sphinx.util.docutils import ReferenceRole
|
||||
except ImportError:
|
||||
# pylint: disable=too-few-public-methods
|
||||
class ReferenceRole(roles.GenericRole):
|
||||
'''
|
||||
The ReferenceRole class (used as a base class by GitLabRefRole
|
||||
below) is only defined in Sphinx >= 2.0.0. For older Sphinx
|
||||
versions, this stub version of the ReferenceRole class is used
|
||||
instead.
|
||||
'''
|
||||
def __init__(self):
|
||||
super().__init__('', nodes.strong)
|
||||
|
||||
|
||||
GITLAB_BASE_URL = 'https://gitlab.isc.org/isc-projects/bind9/-/'
|
||||
|
|
|
|||
Loading…
Reference in a new issue