Commits

Georg Brandl committed 233ccd4

#487: Fix setting the default role to one provided by the ``oldcmarkup`` extension.

Comments (0)

Files changed (2)

 Release 1.0.2 (in development)
 ==============================
 
+* #487: Fix setting the default role to one provided by the
+  ``oldcmarkup`` extension.
+
 * #488: Fix crash when json-py is installed, which provides a
   ``json`` module but is incompatible to simplejson.
 

sphinx/ext/oldcmarkup.py

 
 def old_crole(typ, rawtext, text, lineno, inliner, options={}, content=[]):
     env = inliner.document.settings.env
+    if not typ:
+        typ = env.config.default_role
     if not env.app._oldcmarkup_warned:
         env.warn(env.docname, WARNING_MSG)
         env.app._oldcmarkup_warned = True