diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-03-04 22:47:28 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-03-23 20:24:51 +0900 |
commit | 3d4fc8c47cae2d8c5c5b85015e7ca2ff5ed2e41b (patch) | |
tree | 8c2d7e8aa73c41a2d9bc99ac45f86d0607c7d248 /sphinx/directives/patches.py | |
parent | 86f0336693df45acdc2e968322bd794171e45eef (diff) | |
download | sphinx-git-3d4fc8c47cae2d8c5c5b85015e7ca2ff5ed2e41b.tar.gz |
``math`` directive does not support ``:class:`` option
``:class:`` option is a common options for all directives. But
our implementation does not support it so far. This adds support
for the option.
Diffstat (limited to 'sphinx/directives/patches.py')
-rw-r--r-- | sphinx/directives/patches.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sphinx/directives/patches.py b/sphinx/directives/patches.py index ee8014aa6..c102f3461 100644 --- a/sphinx/directives/patches.py +++ b/sphinx/directives/patches.py @@ -165,6 +165,7 @@ class MathDirective(SphinxDirective): option_spec = { 'label': directives.unchanged, 'name': directives.unchanged, + 'class': directives.class_option, 'nowrap': directives.flag, } @@ -175,6 +176,7 @@ class MathDirective(SphinxDirective): latex = self.arguments[0] + '\n\n' + latex label = self.options.get('label', self.options.get('name')) node = nodes.math_block(latex, latex, + classes=self.options.get('class', []), docname=self.env.docname, number=None, label=label, |