Selaa lähdekoodia

버그 수정

ect (or 2du) 8 vuotta sitten
vanhempi
sitoutus
e745524bcf
2 muutettua tiedostoa jossa 3 lisäystä ja 5 poistoa
  1. 3 3
      app.py
  2. 0 2
      set_mark/start.py

+ 3 - 3
app.py

@@ -1508,10 +1508,10 @@ def edit(name = None):
         new = curs.fetchall()
         if new:
             if request.args.get('section', None):
-                test_data = '\r\n' + new[0][0] + '\r\n'   
+                test_data = '\n' + re.sub('\r\n', '\n', new[0][0]) + '\n'   
 
-                section_data = re.findall('(\r\n(={1,6}) ?((?:(?!=).)+) ?={1,6}\r\n(?:(?:(?:(?!\r\n(={1,6}) ?((?:(?!=).)+) ?={1,6}\r\n).)|\n)*))', test_data)
-                data = section_data[int(request.args.get('section', None)) - 1][0]
+                section_data = re.findall('((?:={1,6}) ?(?:(?:(?!=).)+) ?={1,6}\\n(?:(?:(?!(?:={1,6}) ?(?:(?:(?!=).)+) ?={1,6}\\n).)*))', test_data)
+                data = section_data[int(request.args.get('section', None)) - 1]
             else:
                 data = new[0][0]
         else:

+ 0 - 2
set_mark/start.py

@@ -604,8 +604,6 @@ def start(conn, data, title):
         category = ''
 
     data += category
-
-    print([data])
     
     # 마지막 처리
     data = re.sub('(?P<in><\/h[0-9]>)(\n)+', '\g<in>', data)