Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-20 16:34:22 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-20 16:34:22 +0300
commit0071409fe0b01bf5ba2ee1decfeefe5258b6cb4d (patch)
treefeb9d2f62c98b7b10148b14d4e5ba88860ae3706 /sphinx/ext/graphviz.py
parent68c91b19208cff332eacf30908b63b80482fafb8 (diff)
Fix #8454: graphviz: The layout option for graph and digraph don't work
Diffstat (limited to 'sphinx/ext/graphviz.py')
-rw-r--r--sphinx/ext/graphviz.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py
index 62375f95b..dc1cbb686 100644
--- a/sphinx/ext/graphviz.py
+++ b/sphinx/ext/graphviz.py
@@ -182,7 +182,8 @@ class GraphvizSimple(SphinxDirective):
'alt': directives.unchanged,
'align': align_spec,
'caption': directives.unchanged,
- 'graphviz_dot': directives.unchanged,
+ 'layout': directives.unchanged,
+ 'graphviz_dot': directives.unchanged, # an old alias of `layout` option
'name': directives.unchanged,
'class': directives.class_option,
}
@@ -194,6 +195,8 @@ class GraphvizSimple(SphinxDirective):
node['options'] = {'docname': self.env.docname}
if 'graphviz_dot' in self.options:
node['options']['graphviz_dot'] = self.options['graphviz_dot']
+ if 'layout' in self.options:
+ node['options']['graphviz_dot'] = self.options['layout']
if 'alt' in self.options:
node['alt'] = self.options['alt']
if 'align' in self.options: