Explorar o código

버그 수정

ect (or 2du) %!s(int64=8) %!d(string=hai) anos
pai
achega
48e13614e3
Modificáronse 2 ficheiros con 9 adicións e 2 borrados
  1. 5 1
      app.py
  2. 4 1
      set_mark/start.py

+ 5 - 1
app.py

@@ -3034,8 +3034,12 @@ def read_view(name = None):
 
             div += '</ul>'
             
+            if div == '<br><h2 id="cate_normal">분류</h2><ul></ul>':
+                div = ''
+            
             if u_div != '':
-                div = '<br><h2 id="cate_under">하위 분류</h2><ul>' + u_div + '</ul>' + div
+                div += '<br><h2 id="cate_under">하위 분류</h2><ul>' + u_div + '</ul>'
+
 
     if num:
         curs.execute("select title from history where title = ? and id = ? and hide = 'O'", [name, str(num)])

+ 4 - 1
set_mark/start.py

@@ -881,10 +881,13 @@ def start(conn, data, title):
         else:
             break
 
+    data = re.sub('\n+$', '', data)
+
     footnote_all += '</ul>'
     if footnote_all == '\n<hr><ul id="footnote_data"></ul>':
         footnote_all = ''
 
+    data += '\n'
     data = re.sub('\n$', footnote_all, data, 1)
 
     # 분류 마지막 처리
@@ -894,7 +897,7 @@ def start(conn, data, title):
     if category == '\n<hr><div id="cate">분류: </div>':
         category = ''
 
-    if data != '\n\n':
+    if data != '\n':
         data += category
 
     else: