mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Change the name of mathbase.setup() so that putting it in extensions doesn't fail with an obscure TypeError.
This commit is contained in:
parent
a2c483c20b
commit
630c39d6e1
@ -13,7 +13,7 @@
|
||||
from docutils import nodes
|
||||
|
||||
from sphinx.application import ExtensionError
|
||||
from sphinx.ext.mathbase import setup as mathbase_setup
|
||||
from sphinx.ext.mathbase import setup_math as mathbase_setup
|
||||
|
||||
|
||||
def html_visit_math(self, node):
|
||||
|
@ -132,7 +132,7 @@ def number_equations(app, doctree, docname):
|
||||
node[0] = nodes.Text(num, num)
|
||||
|
||||
|
||||
def setup(app, htmlinlinevisitors, htmldisplayvisitors):
|
||||
def setup_math(app, htmlinlinevisitors, htmldisplayvisitors):
|
||||
app.add_node(math,
|
||||
latex=(latex_visit_math, None),
|
||||
text=(text_visit_math, None),
|
||||
|
@ -25,7 +25,7 @@ from docutils import nodes
|
||||
from sphinx.errors import SphinxError
|
||||
from sphinx.util import ensuredir
|
||||
from sphinx.util.png import read_png_depth, write_png_depth
|
||||
from sphinx.ext.mathbase import setup as mathbase_setup, wrap_displaymath
|
||||
from sphinx.ext.mathbase import setup_math as mathbase_setup, wrap_displaymath
|
||||
|
||||
class MathExtError(SphinxError):
|
||||
category = 'Math extension error'
|
||||
|
Loading…
Reference in New Issue
Block a user