2DU 9 лет назад
Родитель
Сommit
3e96aefed0
4 измененных файлов с 8 добавлено и 5 удалено
  1. 1 1
      app.py
  2. 4 2
      mark.py
  3. 1 1
      update.py
  4. 2 1
      version.md

+ 1 - 1
app.py

@@ -28,7 +28,7 @@ from mark import *
     
 db_pas = pymysql.escape_string
 
-r_ver = '2.1.2'
+r_ver = '2.1.3'
 
 @route('/setup', method=['GET', 'POST'])
 def setup():

+ 4 - 2
mark.py

@@ -615,14 +615,16 @@ def namumark(title, data):
                 if(results[0] == title):
                     data = re.sub('\[\[(((?!\]\]).)*)\]\]', '<b>' + g + '</b>', data, 1)
                 else:
-                    curs.execute("select title from data where title = '" + db_pas(results[0]) + "'")
+                    nosharp = re.sub("<sharp>", "#", results[0])
+                    
+                    curs.execute("select title from data where title = '" + db_pas(nosharp) + "'")
                     y = curs.fetchall()
                     if(y):
                         clas = ''
                     else:
                         clas = 'not_thing'
                     
-                    nosharp = re.sub("<sharp>", "#", results[0])
+                    
                     data = re.sub('\[\[(((?!\]\]).)*)\]\]', '<a title="' + re.sub('#', '\#', nosharp) + sharp + '" class="' + clas + '" href="/w/' + url_pas(nosharp) + sharp + '">' + g + '</a>', data, 1)
 
                     backlink_plus(title, results[0], '')

+ 1 - 1
update.py

@@ -10,7 +10,7 @@ curs = conn.cursor(pymysql.cursors.DictCursor)
 
 db_pas = pymysql.escape_string
 
-r_ver = '2.1.2'
+r_ver = '2.1.3'
 
 curs.execute('select data from other where name = "version"')
 version = curs.fetchall()

+ 2 - 1
version.md

@@ -93,6 +93,7 @@
  * 타임아웃 문제 해결
  * 하위 문서 바로가기
  * app.py 부분 while을 for로 수정
+ * 역링크 구조 개선
 
 ## 계속
  * 버그 수정
@@ -116,7 +117,7 @@
 
 ----
 ## 기타
- * 최신 버전 - v2.1.2
+ * 최신 버전 - v2.1.3
 
 ----
 ## 개발 이념