diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-03-10 12:05:26 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-10 12:05:26 +0900 |
commit | cf74a71848111bcc05c0cd2e55eaa4c76d6526df (patch) | |
tree | e5e21cf5d5b3cbaabec887a930f90bb7501dc5ac /sphinx/directives/patches.py | |
parent | c4a45b4a019790b17ed94cfba860226820fde0cd (diff) | |
parent | d7024fe996382ff3c9e1b35add98abda7b43e49a (diff) | |
download | sphinx-git-cf74a71848111bcc05c0cd2e55eaa4c76d6526df.tar.gz |
Merge branch '2.0' into 2155_code_directive
Diffstat (limited to 'sphinx/directives/patches.py')
-rw-r--r-- | sphinx/directives/patches.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sphinx/directives/patches.py b/sphinx/directives/patches.py index 9d339e5a5..e89355cf7 100644 --- a/sphinx/directives/patches.py +++ b/sphinx/directives/patches.py @@ -173,13 +173,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 |