Commits

Georg Brandl committed 3d90480

#486: Fix removal of ``!`` for all cross-reference roles.

  • Participants
  • Parent commits 5602743

Comments (0)

Files changed (2)

 Release 1.0.2 (in development)
 ==============================
 
+* #486: Fix removal of ``!`` for all cross-reference roles.
+
+
 Release 1.0.1 (Jul 27, 2010)
 ============================
 

File sphinx/roles.py

             classes = ['xref', domain, '%s-%s' % (domain, role)]
         # if the first character is a bang, don't cross-reference at all
         if text[0:1] == '!':
-            text = utils.unescape(text)
+            text = utils.unescape(text)[1:]
             if self.fix_parens:
-                text, tgt = self._fix_parens(env, False, text[1:], "")
+                text, tgt = self._fix_parens(env, False, text, "")
             innernode = self.innernodeclass(rawtext, text, classes=classes)
             return self.result_nodes(inliner.document, env, innernode,
                                      is_ref=False)