mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '1.8' into 2.0
This commit is contained in:
commit
fbb7e9d267
1
CHANGES
1
CHANGES
@ -297,6 +297,7 @@ Bugs fixed
|
||||
* #6047: autodoc: ``autofunction`` emits a warning for method objects
|
||||
* #6028: graphviz: Ensure the graphviz filenames are reproducible
|
||||
* #6068: doctest: ``skipif`` option may remove the code block from documentation
|
||||
* #6136: ``:name:`` option for ``math`` directive causes a crash
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -126,13 +126,16 @@ class MathDirective(SphinxDirective):
|
||||
latex = '\n'.join(self.content)
|
||||
if self.arguments and self.arguments[0]:
|
||||
latex = self.arguments[0] + '\n\n' + latex
|
||||
label = self.options.get('label', self.options.get('name'))
|
||||
node = nodes.math_block(latex, latex,
|
||||
docname=self.env.docname,
|
||||
number=self.options.get('name'),
|
||||
label=self.options.get('label'),
|
||||
number=None,
|
||||
label=label,
|
||||
nowrap='nowrap' in self.options)
|
||||
ret = [node] # type: List[nodes.Node]
|
||||
self.add_name(node)
|
||||
set_source_info(self, node)
|
||||
|
||||
ret = [node] # type: List[nodes.Node]
|
||||
self.add_target(ret)
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user