Spaces:
Runtime error
Runtime error
changes to tolerant when there is a `.` inside the image name before `.png` or `.jpeg` (#5)
Browse files- changes to tolerant when there is a `.` inside the image name before `.png` or `.jpeg` (54cb89ff6d5d4895125230953c9e2504e54f766b)
Co-authored-by: Liao <[email protected]>
app.py
CHANGED
@@ -12,7 +12,7 @@ def fix_imgs(src, dst):
|
|
12 |
return f'![{x.group(1)}|{sz}]({nm})'
|
13 |
else: return f'MISSING IMAGE: {x.group(1)}'
|
14 |
|
15 |
-
|
16 |
|
17 |
def fix_imgs_with_hide(src, dst):
|
18 |
if dst != "":
|
|
|
12 |
return f'![{x.group(1)}|{sz}]({nm})'
|
13 |
else: return f'MISSING IMAGE: {x.group(1)}'
|
14 |
|
15 |
+
result = re.sub(r'!\[\[(\S+)\.(png|jpeg)(\|\d+)?\]\]', repl_img, dst)
|
16 |
|
17 |
def fix_imgs_with_hide(src, dst):
|
18 |
if dst != "":
|