mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
if code is not unicode, change to unicode in ext/graphviz.py.
This commit is contained in:
parent
d01efde712
commit
1e0fd180b1
@ -139,6 +139,11 @@ class GraphvizSimple(Directive):
|
||||
|
||||
def render_dot(self, code, options, format, prefix='graphviz'):
|
||||
"""Render graphviz code into a PNG or PDF output file."""
|
||||
|
||||
# if code is not unicode, convert to unicode. it is expected utf-8
|
||||
if not isinstance(code, text_type):
|
||||
code = code.decode('utf-8')
|
||||
|
||||
hashkey = (code + str(options) + \
|
||||
str(self.builder.config.graphviz_dot) + \
|
||||
str(self.builder.config.graphviz_dot_args)
|
||||
|
Loading…
Reference in New Issue
Block a user