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

#5
by DanielCL - opened
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 != "":