diff --git a/CHANGES b/CHANGES index 60c55e7a9..bc122e9c9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ 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. diff --git a/sphinx/ext/oldcmarkup.py b/sphinx/ext/oldcmarkup.py index 84ae61dd2..00ac37495 100644 --- a/sphinx/ext/oldcmarkup.py +++ b/sphinx/ext/oldcmarkup.py @@ -42,6 +42,8 @@ class OldCDirective(Directive): 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