Merge pull request #4990 from tk0miya/refactor_math4

Refactor math implemenation
This commit is contained in:
Takeshi KOMIYA 2018-05-19 21:50:38 +09:00 committed by GitHub
commit fc5f5e3b86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -193,6 +193,9 @@ class production(nodes.Part, nodes.Inline, nodes.FixedTextElement):
class math(nodes.math):
"""Node for inline equations.
.. warning:: This node is provided to keep compatibility only.
It will be removed in nearly future. Don't use this from your extension.
.. deprecated:: 1.8
Use ``docutils.nodes.math`` instead.
"""
@ -211,6 +214,9 @@ class math(nodes.math):
class math_block(nodes.math_block):
"""Node for block level equations.
.. warning:: This node is provided to keep compatibility only.
It will be removed in nearly future. Don't use this from your extension.
.. deprecated:: 1.8
"""
@ -227,6 +233,9 @@ class math_block(nodes.math_block):
class displaymath(math_block):
"""Node for block level equations.
.. warning:: This node is provided to keep compatibility only.
It will be removed in nearly future. Don't use this from your extension.
.. deprecated:: 1.8
"""

View File

@ -130,8 +130,6 @@ class MathDirective(SphinxDirective):
nowrap='nowrap' in self.options)
ret = [node]
set_source_info(self, node)
if hasattr(self, 'src'):
node.source = self.src
self.add_target(ret)
return ret