Ver código fonte

렌더러 버그 수정

Surplus_Up (2DU) 6 anos atrás
pai
commit
b457f3c7dd
3 arquivos alterados com 12 adições e 10 exclusões
  1. 8 6
      route/func_upload.py
  2. 3 3
      route/tool/set_mark/namumark.py
  3. 1 1
      version.json

+ 8 - 6
route/func_upload.py

@@ -71,21 +71,23 @@ def func_upload_2(conn):
             db_data = curs.fetchall()
             if db_data and db_data[0][0] == 'namumark':
                 if flask.request.form.get('f_lice_sel', 'direct_input') == 'direct_input':
-                    lice = g_lice + '[br][br]'
+                    lice = '\n||' + g_lice + '||\n'
                     if ip_or_user(ip) != 0:
-                        lice += ip
+                        lice += '||' + ip + '||\n'
                     else:
-                        lice += '[[user:' + ip + ']]'
+                        lice += '||[[user:' + ip + ']]||\n'
 
                     lice += '[[category:direct_input]]'
                 else:
-                    lice = flask.request.form.get('f_lice_sel', '')
-                    lice += '[br][br]'  + g_lice
+                    lice = '\n||' + flask.request.form.get('f_lice_sel', '') + '||\n'
+                    lice += '||'  + g_lice + '||\n'
                     lice += '[[category:' + re.sub(r'\]', '_', flask.request.form.get('f_lice_sel', '')) + ']]'
 
-                file_d = '[[file:' + name + ']][br][br]{{{[[file:' + name + ']]}}}[br][br]' + lice
+                file_d = '[[file:' + name + ']]\n{{{[[file:' + name + ']]}}}\n' + lice
             else:
                 file_d = name + ' | /image/' + e_data + ((' | ' + g_lice) if g_lice != '' else '') + ' | ' + ip
+                
+            print([lice])
 
             curs.execute(db_change("insert into data (title, data) values (?, ?)"), ['file:' + name, file_d])
             curs.execute(db_change("insert into acl (title, decu, dis, why, view) values (?, 'admin', '', '', '')"), ['file:' + name])

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

@@ -168,7 +168,7 @@ def table_start(data):
     while 1:
         cel_num = 0
         table_num = 0
-        table_end = ''
+        table_end = '<div class="table_safe"><table>'
         cel_color = {}
 
         table = re.search(r'\n((?:(?:(?:(?:\|\||\|[^|]+\|)+(?:(?:(?!\|\|).\n*)*))+)\|\|(?:\n)?)+)', data)
@@ -185,7 +185,7 @@ def table_start(data):
             
             table = '\n' + table
             
-            table_cel = re.findall(r'(\n(?:(?:\|\|)+)|\|\|\n(?:(?:\|\|)+)|(?:(?:\|\|)+))((?:(?:(?!\n|\|\|).)+\n*)+)', table)
+            table_cel = re.findall(r'(\n(?:(?:\|\|)+)|[^\n]\|\|\n(?:(?:\|\|)+)|(?:(?:\|\|)+))((?:(?:(?!\n|\|\|).)+\n*)+)', table)
             for i in table_cel:
                 cel_plus = re.search(r'^((?:&lt;(?:(?:(?!&gt;).)*)&gt;)+)', i[1])
                 cel_plus = cel_plus.group(1) if cel_plus else ''
@@ -205,7 +205,7 @@ def table_start(data):
                     cel_color = cel_plus[8]
                     table_num = cel_plus[6]
 
-                    table_end += '' + \
+                    table_end = '' + \
                         '<div class="table_safe" ' + cel_plus[7] + '>' + \
                             '<table ' + cel_plus[5] + ' ' + cel_plus[0] + '>' + \
                                 table_caption + \

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "master" : {
-        "r_ver" : "v3.1.8-master-55",
+        "r_ver" : "v3.1.8-master-56",
         "c_ver" : "3184400",
         "s_ver" : "8"
     }, "stable" : {