Fix #3038: `sphinx.ext.math*` raises TypeError if labels are duplicated

This commit is contained in:
Takeshi KOMIYA 2016-10-13 00:32:28 +09:00
parent d87ba0d1da
commit cdafec02ad
2 changed files with 2 additions and 1 deletions

View File

@ -37,6 +37,7 @@ Bugs fixed
* #147: Problem with latex chapter style * #147: Problem with latex chapter style
* #3018: LaTeX problem with page layout dimensions and chapter titles * #3018: LaTeX problem with page layout dimensions and chapter titles
* Fix an issue with ``\pysigline`` in LaTeX style file (ref #3023) * Fix an issue with ``\pysigline`` in LaTeX style file (ref #3023)
* #3038: ``sphinx.ext.math*`` raises TypeError if labels are duplicated
Documentation Documentation
------------- -------------

View File

@ -209,7 +209,7 @@ class MathDirective(Directive):
self.state.document.note_explicit_target(target) self.state.document.note_explicit_target(target)
ret.insert(0, target) ret.insert(0, target)
except UserWarning as exc: except UserWarning as exc:
self.state_machine.reporter.warning(exc[0], line=self.lineno) self.state_machine.reporter.warning(exc.args[0], line=self.lineno)
def latex_visit_math(self, node): def latex_visit_math(self, node):