You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug :name: option for math directive causes a crash on v1.8.
I can built it successfully with v1.7.
To Reproduce
Put following mark up to your document:
.. math:: x = 1
:name: test
and build it.
Traceback (most recent call last):
File "/Users/tkomiya/work/sphinx/sphinx/cmd/build.py", line 304, in build_main
app.build(args.force_all, filenames)
File "/Users/tkomiya/work/sphinx/sphinx/application.py", line 341, in build
self.builder.build_update()
File "/Users/tkomiya/work/sphinx/sphinx/builders/__init__.py", line 347, in build_update
len(to_build))
File "/Users/tkomiya/work/sphinx/sphinx/builders/__init__.py", line 412, in build
self.write(docnames, list(updated_docnames), method)
File "/Users/tkomiya/work/sphinx/sphinx/builders/__init__.py", line 593, in write
self._write_serial(sorted(docnames))
File "/Users/tkomiya/work/sphinx/sphinx/builders/__init__.py", line 604, in _write_serial
self.write_doc(docname, doctree)
File "/Users/tkomiya/work/sphinx/sphinx/builders/html.py", line 731, in write_doc
self.docwriter.write(doctree, destination)
File "/Users/tkomiya/work/tmp/lib/python3.6/site-packages/docutils/writers/__init__.py", line 80, in write
self.translate()
File "/Users/tkomiya/work/sphinx/sphinx/writers/html.py", line 58, in translate
self.document.walkabout(visitor)
File "/Users/tkomiya/work/tmp/lib/python3.6/site-packages/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/Users/tkomiya/work/tmp/lib/python3.6/site-packages/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/Users/tkomiya/work/tmp/lib/python3.6/site-packages/docutils/nodes.py", line 166, in walkabout
visitor.dispatch_visit(self)
File "/Users/tkomiya/work/tmp/lib/python3.6/site-packages/docutils/nodes.py", line 1894, in dispatch_visit
return method(node)
File "/Users/tkomiya/work/sphinx/sphinx/writers/html.py", line 886, in visit_math_block
visit(self, node)
File "/Users/tkomiya/work/sphinx/sphinx/ext/mathjax.py", line 49, in html_visit_displaymath
number = get_node_equation_number(self, node)
File "/Users/tkomiya/work/sphinx/sphinx/util/math.py", line 28, in get_node_equation_number
id = node['ids'][0]
IndexError: list index out of range
Expected behavior
build succeeded.
Your project
N/A
Screenshots
N/A
Environment info
OS: Mac
Python version: 3.6.5
Sphinx version: 1.8.4
Sphinx extensions: Nothing
The text was updated successfully, but these errors were encountered:
Describe the bug
:name:
option for math directive causes a crash on v1.8.I can built it successfully with v1.7.
To Reproduce
Put following mark up to your document:
and build it.
Expected behavior
build succeeded.
Your project
N/A
Screenshots
N/A
Environment info
The text was updated successfully, but these errors were encountered: