mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Merge pull request #468 from BlueGreenMagick/fix-comment-setwebexports
allow either \ or / in web exports filter
This commit is contained in:
commit
e2c6fd464c
2 changed files with 6 additions and 5 deletions
|
@ -161,9 +161,8 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||||
if not pattern:
|
if not pattern:
|
||||||
return path
|
return path
|
||||||
|
|
||||||
if not re.fullmatch(pattern, subPath):
|
subPath2 = subPath.replace(os.sep, "/")
|
||||||
return path
|
if re.fullmatch(pattern, subPath) or re.fullmatch(pattern, subPath2):
|
||||||
|
|
||||||
newPath = os.path.join(addMgr.addonsFolder(), addonPath)
|
newPath = os.path.join(addMgr.addonsFolder(), addonPath)
|
||||||
return newPath
|
return newPath
|
||||||
|
|
||||||
|
|
|
@ -149,6 +149,8 @@ class WebContent:
|
||||||
f"/_addons/{addon_package}/web/my-addon.css")
|
f"/_addons/{addon_package}/web/my-addon.css")
|
||||||
web_content.js.append(
|
web_content.js.append(
|
||||||
f"/_addons/{addon_package}/web/my-addon.js")
|
f"/_addons/{addon_package}/web/my-addon.js")
|
||||||
|
|
||||||
|
Note that '/' will also match the os specific path separator.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
body: str = ""
|
body: str = ""
|
||||||
|
|
Loading…
Reference in a new issue