Procházet zdrojové kódy

일부 문법 호환성

잉여개발기 (SPDV) před 5 roky
rodič
revize
19acf13f81
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 3 3
      route/tool/set_mark/namumark.py
  2. 1 1
      version.json

+ 3 - 3
route/tool/set_mark/namumark.py

@@ -868,7 +868,7 @@ def namumark(conn, data, title, include_num):
     data = data.replace('<macro_middle>', '(')
     data = data.replace('<macro_end>', ')]')
 
-    blockquote_re = re.compile(r'(\n(?:&gt; ?(?:[^\n]+)\n)+)')
+    blockquote_re = re.compile(r'(\n(?:&gt; ?(?:[^\n]*)\n)+)')
     while 1:
         blockquote = blockquote_re.search(data)
         if blockquote:
@@ -890,14 +890,14 @@ def namumark(conn, data, title, include_num):
     data = re.sub(r'(?P<in>\n +\* ?(?:(?:(?!\|\|).)+))\|\|', '\g<in>\n ||', data)
     data = re.sub(r'(?P<in><div id="folding_(?:[0-9]+)" style="display: none;"><div style="">|<blockquote>)(?P<out> )?\* ', '\g<in>\n\g<out>* ', data)
 
-    li_re = re.compile(r'(\n(?:(?: +)\* (?:[^\n]+)\n)+)')
+    li_re = re.compile(r'(\n(?:(?: *)\* (?:[^\n]+)\n)+)')
     while 1:
         li_data = li_re.search(data)
         if li_data:
             li_data = li_data.group(1)
             li_end_data = ''
 
-            sub_li = re.findall(r'( +)\* ([^\n]+)\n', li_data)
+            sub_li = re.findall(r'( *)\* ([^\n]+)\n', li_data)
             for i in sub_li:
                 li_end_data += '<li style="margin-left: ' + str(20 if len(i[0]) == 0 else (len(i[0]) * 20)) + 'px;">' + i[1] + '</li>'
 

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "master" : {
-        "r_ver" : "v3.2.0-master-21 (v3.2.0-dev-202008010-02)",
+        "r_ver" : "v3.2.0-master-22 (v3.2.0-dev-202008010-03)",
         "c_ver" : "3202100",
         "s_ver" : "9"
     }, "stable" : {