Browse Source

Merge pull request #989 from 2du/dev

Dev
잉여개발기 (SPDV) 5 năm trước cách đây
mục cha
commit
dd885a97d3
3 tập tin đã thay đổi với 6 bổ sung6 xóa
  1. 1 1
      route/tool/func.py
  2. 3 3
      route/tool/set_mark/namumark.py
  3. 2 2
      version.json

+ 1 - 1
route/tool/func.py

@@ -261,7 +261,7 @@ def update(ver_num, set_data):
                 get_data[2]
             ])
 
-    if ver_num < 3202100:
+    if ver_num < 3202200:
         curs.execute(db_change('delete from cache_data'))
 
     conn.commit()

+ 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>'
 

+ 2 - 2
version.json

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