Răsfoiți Sursa

버그 수정

2DU 8 ani în urmă
părinte
comite
e9ef8f3a8f
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      mark.py

+ 3 - 1
mark.py

@@ -664,7 +664,9 @@ def namumark(title, data, num):
                         height = height_d[0]
 
                 if(img_d[0] == '파일'):
-                    data = re.sub("\[\[(파일|외부):((?:(?!\]\]|\|).)*)(?:\|((?:(?!\]\]).)*))?\]\]", '<a href="/w/파일:' + img_d[1] + '"><img src="/image/' + sha224(img_d[1]) + '" width="' + width + '" height="' + height + '"></a>', data, 1)
+                    img_e = re.search('^(.+)(\.(?:.+))$', img_d[1]).groups()
+                    
+                    data = re.sub("\[\[(파일|외부):((?:(?!\]\]|\|).)*)(?:\|((?:(?!\]\]).)*))?\]\]", '<a href="/w/파일:' + img_d[1] + '"><img src="/image/' + sha224(img_e[0]) + img_e[1] + '" width="' + width + '" height="' + height + '"></a>', data, 1)
                 else:
                     data = re.sub("\[\[(파일|외부):((?:(?!\]\]|\|).)*)(?:\|((?:(?!\]\]).)*))?\]\]", '<img src="' + img_d[1] + '" width="' + width + '" height="' + height + '">', data, 1)
             else: