ect (or 2du) 8 lat temu
rodzic
commit
645e000fc2
3 zmienionych plików z 11 dodań i 5 usunięć
  1. 1 1
      app.py
  2. 1 1
      set_mark/include_pas.py
  3. 9 3
      set_mark/link.py

+ 1 - 1
app.py

@@ -2743,7 +2743,7 @@ def read_view(name = None):
                     curs.execute("select data from data where title = ?", [data[0]])
                     db_data = curs.fetchall()
                     if(db_data):
-                        cat_data = re.sub("\[\[(분류:(?:(?:(?!\]\]|\|).)+))(?!\|include)\]\]", "", mid_pas(db_data[0][0], 0, 1, 0, 0)[0])
+                        cat_data = re.sub("\[\[(분류:(?:(?:(?!\]\]|#include).)+))\]\]", "", mid_pas(db_data[0][0], 0, 1, 0, 0)[0])
                         if(re.search('\[\[' + name + '|include]]', cat_data)):
                             div += ' * [[' + data[0] + ']]\r\n * [[wiki:xref/' + url_pas(data[0]) + '|' + data[0] + ']] (역링크)\r\n'
                         else:

+ 1 - 1
set_mark/include_pas.py

@@ -28,7 +28,7 @@ def include_pas(conn, data, title, in_c, num, toc_y, fol_num):
             if(in_con):                        
                 in_data = in_con[0][0]
                 in_data = include.sub("", in_data)
-                in_data = re.sub("\[\[(분류:(?:(?:(?!\]\]|\|).)+))(?!\|include)\]\]", "", in_data)
+                in_data = re.sub("\[\[(분류:(?:(?:(?!\]\]|#include).)+))\]\]", "", in_data)
                 in_data = re.sub("\n", "\r\n", re.sub("\r\n", "\n", in_data))
                 in_data = html_pas.html_pas(in_data)
                 

+ 9 - 3
set_mark/link.py

@@ -13,7 +13,7 @@ def link(conn, title, data, num, category, backlink):
     curs = conn.cursor()
     data = data.replace('\', '\\')
     
-    m = re.findall("\[\[(분류:(?:(?:(?!\]\]|\|).)+))(?:\|((?:(?!\]\]).)+))?\]\]", data)
+    m = re.findall("\[\[(분류:(?:(?:(?!\]\]|#).)+))((?:#(?:(?:(?!#|\]\]).)+))+)?\]\]", data)
     for g in m:
         if(title != g[0]):
             if(num == 1):
@@ -27,10 +27,16 @@ def link(conn, title, data, num, category, backlink):
 
             if(category != ''):    
                 category += ' / '                
+
+            style = ''
+            if(g[1]):
+                print(g[1])
+                if(re.search('#blur', g[1])):
+                    style = ' style="filter: blur(3px);" onmouseover="this.style.filter=\'none\';" onmouseout="this.style.filter=\'blur(3px)\';"'
                 
-            category += '<a ' + red + ' href="/w/' + url_pas(g[0]) + '">' + re.sub("분류:", "", g[0]) + '</a>'
+            category += '<a ' + red + ' ' + style + '" href="/w/' + url_pas(g[0]) + '">' + re.sub("분류:", "", g[0]) + '</a>'
         
-        data = re.sub("\[\[(분류:(?:(?:(?!\]\]|\|).)+))(?:\|((?:(?!\]\]).)+))?\]\]", '', data, 1)
+        data = re.sub("\[\[(분류:(?:(?:(?!\]\]|#).)+))((?:#(?:(?:(?!#|\]\]).)+))+)?\]\]", '', data, 1)
     
     test = re.findall('\[\[wiki:([^|\]]+)(?:\|([^\]]+))?\]\]', data)
     for wiki in test: