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-08 03:00:46 +0300
committercocoatomo <cocoatomo77@gmail.com>2018-11-08 03:00:46 +0300
commit8196fe544a598bd96bdc65966cd53daa669fafd3 (patch)
tree09a847d073108798b207e599e65bddd96204bd68 /sphinx/roles.py
parentd58eb355156f8fa6c4b7b6a82f9e895a30e7b8f4 (diff)
Revert "More simplified"
This reverts commit d58eb355156f8fa6c4b7b6a82f9e895a30e7b8f4.
Diffstat (limited to 'sphinx/roles.py')
-rw-r--r--sphinx/roles.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/roles.py b/sphinx/roles.py
index 29616352e..e785e36e0 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -69,14 +69,13 @@ class XRefRole:
"""
def __init__(self, fix_parens=False, lowercase=False,
- nodeclass=addnodes.pending_xref, innernodeclass=nodes.literal,
- warn_dangling=False):
+ nodeclass=None, innernodeclass=None, 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
- self.innernodeclass = innernodeclass
+ self.nodeclass = nodeclass or addnodes.pending_xref
+ self.innernodeclass = innernodeclass or nodes.literal
def _fix_parens(self, env, has_explicit_title, title, target):
# type: (BuildEnvironment, bool, unicode, unicode) -> Tuple[unicode, unicode]