Attachments tutorial bugfixes.

This commit is contained in:
Garth Minette
2021-04-26 15:52:23 -07:00
parent b91c594141
commit 165a454ff9
2 changed files with 7 additions and 4 deletions

View File

@@ -73,7 +73,10 @@ def processFile(infile, outfile=None, imgroot=""):
elif in_script:
if line == "```":
in_script = False
imgfile = os.path.join(imgroot, "{}_{}.png".format(fileroot, imgnum))
fext = "png"
if any(x in extyp for x in ("Anim", "Spin")):
fext = "gif"
imgfile = os.path.join(imgroot, "{}_{}.{}".format(fileroot, imgnum, fext))
imgmgr.new_request(
fileroot+".md", linenum,
imgfile, script, extyp,