Spaces:
Runtime error
Runtime error
changes to tolerant when there is a `.` inside the image name before `.png` or `.jpeg`
#5
by
DanielCL
- opened
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 != "":
|