Selaa lähdekoodia

버그 수정 2

2DU 8 vuotta sitten
vanhempi
sitoutus
dfda840d24
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      mark.py

+ 2 - 1
mark.py

@@ -338,9 +338,10 @@ def mid_pas(data, fol_num, include, in_c):
         else:
             break
             
-    com = re.compile("<code>((?:(?!<\/code>).)*)<\/code>", re.DOTALL)
+    com = re.compile("<code>((?:(?!(?:<code>|<\/code>)).)*)<\/code>", re.DOTALL)
     da_com = com.findall(data)
     for com_da in da_com:
+        print(com_da)
         mid_data = re.sub("<\/span>", "}}}", com_da)
         mid_data = re.sub("<\/div>", "}}}", mid_data)
         mid_data = re.sub('<span class="font\-size\-(?P<in>[1-6])">', "{{{+\g<in> ", mid_data)