Change the name of mathbase.setup() so that putting it in extensions doesn't fail with an obscure TypeError.

This commit is contained in:
Georg Brandl 2009-11-08 19:01:31 +01:00
parent a2c483c20b
commit 630c39d6e1
3 changed files with 3 additions and 3 deletions

View File

@ -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):

View File

@ -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),

View File

@ -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'