summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-02-28 10:19:36 +0100
committerGeorg Brandl <georg@python.org>2010-02-28 10:19:36 +0100
commita8cca36b28a33b22e7d79600cfbbd33f5ec4f09a (patch)
treee857bcd3fcb9a2453e88fe28917493890fa20418
parent74aab2f9e245ff44c1eb6d5f658836c0493df56e (diff)
downloadsphinx-a8cca36b28a33b22e7d79600cfbbd33f5ec4f09a.tar.gz
Fix-up classes for roles without domain.
-rw-r--r--sphinx/roles.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/roles.py b/sphinx/roles.py
index ae035436..d20898ff 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -101,9 +101,10 @@ class XRefRole(object):
typ = typ.lower()
if ':' not in typ:
domain, role = '', typ
+ classes = ['xref', role]
else:
domain, role = typ.split(':', 1)
- classes = ['xref', domain, '%s-%s' % (domain, role)]
+ classes = ['xref', domain, '%s-%s' % (domain, role)]
text = utils.unescape(text)
# if the first character is a bang, don't cross-reference at all
if text[0:1] == '!':