Add mapping in redirectWebExport for new jquery file

This commit is contained in:
Henrik Giesel 2020-12-28 14:52:44 +01:00
parent 98407c3fea
commit 202fd6ffa5

View file

@ -190,10 +190,17 @@ def _redirectWebExports(path):
else:
addprefix = "js/"
if addprefix:
oldpath = path
path = f"{targetPath}{addprefix}{filename}"
print(f"legacy {oldpath} remapped to {path}")
elif dirname == "_anki/js/vendor":
base, ext = os.path.splitext(filename)
if base == "jquery":
base = "jquery.min"
addprefix = "js/vendor/"
if addprefix:
oldpath = path
path = f"{targetPath}{addprefix}{base}{ext}"
print(f"legacy {oldpath} remapped to {path}")
return _exportFolder, path[len(targetPath) :]