summaryrefslogtreecommitdiff
path: root/sphinx/roles.py
diff options
context:
space:
mode:
authorgeorg.brandl <devnull@localhost>2008-03-21 14:00:34 +0000
committergeorg.brandl <devnull@localhost>2008-03-21 14:00:34 +0000
commit3d1f2a4d6e3a4d305728eee834497277e434bcf1 (patch)
tree837cc3ffb9ffade3a6b69c2b55952b955feee56d /sphinx/roles.py
parent5a7a94b906f9bbc4f758f3731b2168eacbc011cc (diff)
downloadsphinx-3d1f2a4d6e3a4d305728eee834497277e434bcf1.tar.gz
* Allow the ~ prefix on module xrefs.
* The parse function for custom descitems must return the full name for x-refing.
Diffstat (limited to 'sphinx/roles.py')
-rw-r--r--sphinx/roles.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/roles.py b/sphinx/roles.py
index 9f4a45cd..7665340d 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -120,8 +120,9 @@ def xfileref_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
# we want a cross-reference, create the reference node
pnode = addnodes.pending_xref(rawtext, reftype=typ, refcaption=False,
modname=env.currmodule, classname=env.currclass)
+ innertext = text
# special actions for Python object cross-references
- if typ in ('data', 'exc', 'func', 'class', 'const', 'attr', 'meth'):
+ if typ in ('data', 'exc', 'func', 'class', 'const', 'attr', 'meth', 'mod'):
# if the first character is a dot, search more specific namespaces first
# else search builtins first
if text[0:1] == '.':
@@ -134,7 +135,6 @@ def xfileref_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
dot = text.rfind('.')
if dot != -1:
innertext = text[dot+1:]
- innertext = text
# look if explicit title and target are given
brace = text.find('<')
if brace != -1: