fix tempfile line separation

This commit is contained in:
Milka64 2023-12-11 07:22:27 +01:00
parent bd1637eb88
commit 5e5e658014

View file

@ -18,6 +18,7 @@ class D2langDirective(Directive):
with tempfile.NamedTemporaryFile() as fp:
for line in self.content.splitlines():
fp.write(bytes(line,'utf-8'))
fp.write(bytes('\n','utf-8'))
fp.seek(0)
cmd_line = '%s %s %s' % (d2_bin, fp.name, srcdir + "/test.svg")
args = shlex.split(cmd_line)