fix svg path
This commit is contained in:
parent
c067d5fa43
commit
862c030c85
3 changed files with 5 additions and 4 deletions
|
@ -22,10 +22,11 @@ class D2langDirective(SphinxDirective):
|
|||
d2_bin = which('d2')
|
||||
srcdir = self.state.document.settings.env.srcdir
|
||||
diag_source = self.content
|
||||
out_dir = self.state.document.current_source.rsplit("/",1)[0]
|
||||
if 'filename' in self.options:
|
||||
output_fname = self.options.get('filename')
|
||||
output_fname = out_dir + "/" + self.options.get('filename')
|
||||
else:
|
||||
output_fname = "d2lang_svg/" + str(uuid.uuid4()) + ".svg"
|
||||
output_fname = out_dir + "/" + "d2lang_svg/" + str(uuid.uuid4()) + ".svg"
|
||||
if 'layout' in self.options:
|
||||
layout = self.options.get('layout')
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue