Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcocoatomo <cocoatomo77@gmail.com>2018-11-07 04:40:10 +0300
committercocoatomo <cocoatomo77@gmail.com>2018-11-07 04:40:10 +0300
commitd58eb355156f8fa6c4b7b6a82f9e895a30e7b8f4 (patch)
tree3ae4fe2e3d8f04dd868cfde3082ed206b2756fa6 /sphinx/roles.py
parent72371fd7d44d3058601f777eae8c19906ac5f60f (diff)
More simplified
Diffstat (limited to 'sphinx/roles.py')
-rw-r--r--sphinx/roles.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sphinx/roles.py b/sphinx/roles.py
index e785e36e0..29616352e 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -69,13 +69,14 @@ class XRefRole:
"""
def __init__(self, fix_parens=False, lowercase=False,
- nodeclass=None, innernodeclass=None, warn_dangling=False):
+ nodeclass=addnodes.pending_xref, innernodeclass=nodes.literal,
+ warn_dangling=False):
# type: (bool, bool, Type[nodes.reference], Type[nodes.TextElement], bool) -> None
self.fix_parens = fix_parens
self.lowercase = lowercase
self.warn_dangling = warn_dangling
- self.nodeclass = nodeclass or addnodes.pending_xref
- self.innernodeclass = innernodeclass or nodes.literal
+ self.nodeclass = nodeclass
+ self.innernodeclass = innernodeclass
def _fix_parens(self, env, has_explicit_title, title, target):
# type: (BuildEnvironment, bool, unicode, unicode) -> Tuple[unicode, unicode]