mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#487: Fix setting the default role to one provided by the `oldcmarkup
` extension.
This commit is contained in:
parent
29547f7981
commit
eedef65aa6
3
CHANGES
3
CHANGES
@ -1,6 +1,9 @@
|
|||||||
Release 1.0.2 (in development)
|
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
|
* #488: Fix crash when json-py is installed, which provides a
|
||||||
``json`` module but is incompatible to simplejson.
|
``json`` module but is incompatible to simplejson.
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@ class OldCDirective(Directive):
|
|||||||
|
|
||||||
def old_crole(typ, rawtext, text, lineno, inliner, options={}, content=[]):
|
def old_crole(typ, rawtext, text, lineno, inliner, options={}, content=[]):
|
||||||
env = inliner.document.settings.env
|
env = inliner.document.settings.env
|
||||||
|
if not typ:
|
||||||
|
typ = env.config.default_role
|
||||||
if not env.app._oldcmarkup_warned:
|
if not env.app._oldcmarkup_warned:
|
||||||
env.warn(env.docname, WARNING_MSG)
|
env.warn(env.docname, WARNING_MSG)
|
||||||
env.app._oldcmarkup_warned = True
|
env.app._oldcmarkup_warned = True
|
||||||
|
Loading…
Reference in New Issue
Block a user