mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#253: Ignore graphviz directives without content instead of
raising an unhandled exception.
This commit is contained in:
parent
456abdefbe
commit
3cc52246b2
3
CHANGES
3
CHANGES
@ -1,6 +1,9 @@
|
||||
Release 0.6.3 (in development)
|
||||
==============================
|
||||
|
||||
* #253: Ignore graphviz directives without content instead of
|
||||
raising an unhandled exception.
|
||||
|
||||
* #241: Fix a crash building LaTeX output for documents that contain
|
||||
a todolist directive.
|
||||
|
||||
|
@ -50,8 +50,13 @@ class Graphviz(Directive):
|
||||
option_spec = {}
|
||||
|
||||
def run(self):
|
||||
dotcode = '\n'.join(self.content)
|
||||
if not dotcode.strip():
|
||||
return [self.state_machine.reporter.warning(
|
||||
'Ignoring "graphviz" directive without content.',
|
||||
line=self.lineno)]
|
||||
node = graphviz()
|
||||
node['code'] = '\n'.join(self.content)
|
||||
node['code'] = dotcode
|
||||
node['options'] = []
|
||||
return [node]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user