DanielCL commited on
Commit
54cb89f
1 Parent(s): bd669c9

changes to tolerant when there is a `.` inside the image name before `.png` or `.jpeg`

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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
- return re.sub(r'!\[\[([^.]+)\.\w+(\|\d+)?\]\]', repl_img, dst)
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 != "":