فهرست منبع

버그 수정

ect (or 2du) 8 سال پیش
والد
کامیت
9f90c1af5b
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 1 0
      set_mark/mid_pas.py
  2. 2 2
      set_mark/table.py

+ 1 - 0
set_mark/mid_pas.py

@@ -5,6 +5,7 @@ def mid_pas(data, fol_num, include, in_c, toc_y):
     syntax = 0
     folding_test = 0
 
+    com = re.compile("{{{((?:(?!{{{|}}}).)*)}}}", re.DOTALL)
     while 1:
         is_it = com.search(data)
         if is_it:

+ 2 - 2
set_mark/table.py

@@ -133,7 +133,7 @@ def table(data):
     data = re.sub("#table-no-br#", "\r\n", data)
     
     while 1:
-        m = re.search("(?:\n|<br>)(\|\|(?:(?:(?:.*)\n?)\|\|)+)", data)
+        m = re.search("(?:\n|<br>|<span>)(\|\|(?:(?:(?:.*)\n?)\|\|)+)", data)
         if m:
             results = m.groups()
             table = results[0]
@@ -239,7 +239,7 @@ def table(data):
                 else:
                     break
             
-            data = re.sub("(?:\n|<br>)(\|\|(?:(?:(?:.*)\n?)\|\|)+)", table, data, 1)
+            data = re.sub("(?:\n|<br>|<span>)(\|\|(?:(?:(?:.*)\n?)\|\|)+)", table, data, 1)
         else:
             break