Explorar el Código

wiki style을 이용한 반달가면 임시 조치

https://github.com/openNAMU/openNAMU/issues/2273
잉여개발기 (SPDV) hace 2 años
padre
commit
1d68cbc303
Se han modificado 2 ficheros con 12 adiciones y 1 borrados
  1. 11 0
      route/tool/func_render_namumark.py
  2. 1 1
      version.json

+ 11 - 0
route/tool/func_render_namumark.py

@@ -1882,6 +1882,17 @@ class class_do_render_namumark:
                             else:
                                 wiki_data_style = ''
 
+                        find_regex = [
+                            r" *box-shadow *: *(([^,;]*)(,|;|$)){10,}",
+                            r" *url\([^()]*\)",
+                            r" *linear-gradient\((([^(),]+)(,|\))){10,}",
+                            r" *position *: *"
+                        ]
+                        for for_a in find_regex:
+                            if re.search(for_a, wiki_data_style_data, flags = re.I):
+                                wiki_data_style_data = ""
+                                break
+
                         wiki_data = self.get_tool_data_revert(wiki_data)
                         wiki_data = re.sub('(^\n|\n$)', '', wiki_data)
 

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "beta" : {
-        "r_ver" : "v3.5.0-v150",
+        "r_ver" : "v3.5.0-v151",
         "c_ver" : "20240513",
         "s_ver" : "20240426"
     }