mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8455 from tk0miya/8454_graphviz_layout_option
Fix #8454: graphviz: The layout option for graph and digraph don't work
This commit is contained in:
commit
296e764198
1
CHANGES
1
CHANGES
@ -48,6 +48,7 @@ Bugs fixed
|
|||||||
* #8443: autodoc: autoattribute directive can't create document for PEP-526
|
* #8443: autodoc: autoattribute directive can't create document for PEP-526
|
||||||
based uninitalized variables
|
based uninitalized variables
|
||||||
* #8419: html search: Do not load ``language_data.js`` in non-search pages
|
* #8419: html search: Do not load ``language_data.js`` in non-search pages
|
||||||
|
* #8454: graphviz: The layout option for graph and digraph directives don't work
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
@ -182,7 +182,8 @@ class GraphvizSimple(SphinxDirective):
|
|||||||
'alt': directives.unchanged,
|
'alt': directives.unchanged,
|
||||||
'align': align_spec,
|
'align': align_spec,
|
||||||
'caption': directives.unchanged,
|
'caption': directives.unchanged,
|
||||||
'graphviz_dot': directives.unchanged,
|
'layout': directives.unchanged,
|
||||||
|
'graphviz_dot': directives.unchanged, # an old alias of `layout` option
|
||||||
'name': directives.unchanged,
|
'name': directives.unchanged,
|
||||||
'class': directives.class_option,
|
'class': directives.class_option,
|
||||||
}
|
}
|
||||||
@ -194,6 +195,8 @@ class GraphvizSimple(SphinxDirective):
|
|||||||
node['options'] = {'docname': self.env.docname}
|
node['options'] = {'docname': self.env.docname}
|
||||||
if 'graphviz_dot' in self.options:
|
if 'graphviz_dot' in self.options:
|
||||||
node['options']['graphviz_dot'] = self.options['graphviz_dot']
|
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:
|
if 'alt' in self.options:
|
||||||
node['alt'] = self.options['alt']
|
node['alt'] = self.options['alt']
|
||||||
if 'align' in self.options:
|
if 'align' in self.options:
|
||||||
|
Loading…
Reference in New Issue
Block a user