Selaa lähdekoodia

문법 추가

2DU 9 vuotta sitten
vanhempi
sitoutus
0073b87d78
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      app.py

+ 2 - 0
app.py

@@ -466,6 +466,8 @@ def namumark(title, data):
             data = re.sub("\[youtube\(((?:(?!,|\)\]).)*)(?:,\s)?(?:width=((?:(?!,|\)\]).)*))?(?:,\s)?(?:height=((?:(?!,|\)\]).)*))?(?:,\s)?(?:width=((?:(?!,|\)\]).)*))?\)\]", '<iframe width="' + width + '" height="' + height + '" src="https://www.youtube.com/embed/' + result[0] + '" frameborder="0" allowfullscreen></iframe>', data, 1)
         else:
             break
+     
+    data = re.sub("\[\[(?::(?P<in>(?:분류|파일):(?:(?:(?!\]\]).)*)))\]\]", "[[\g<in>]]", data)
             
     while True:
         m = re.search("\[\[(((?!\]\]).)*)\]\]", data)