mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix warning to report actual line of occurrence.
This commit is contained in:
parent
f69e6ed4eb
commit
193aadb140
@ -20,7 +20,7 @@ def make_admonition(node_class, name, arguments, options, content, lineno,
|
|||||||
content_offset, block_text, state, state_machine):
|
content_offset, block_text, state, state_machine):
|
||||||
warnings.warn('make_admonition is deprecated, use '
|
warnings.warn('make_admonition is deprecated, use '
|
||||||
'docutils.parsers.rst.directives.admonitions.BaseAdmonition '
|
'docutils.parsers.rst.directives.admonitions.BaseAdmonition '
|
||||||
'instead', DeprecationWarning, stacklevel=1)
|
'instead', DeprecationWarning, stacklevel=2)
|
||||||
text = '\n'.join(content)
|
text = '\n'.join(content)
|
||||||
admonition_node = node_class(text)
|
admonition_node = node_class(text)
|
||||||
if arguments:
|
if arguments:
|
||||||
|
Loading…
Reference in New Issue
Block a user