Ver código fonte

이래서 일괄 변환은 안돼

ect (or 2du) 8 anos atrás
pai
commit
156132e1e5
3 arquivos alterados com 2 adições e 1 exclusões
  1. 1 0
      .gitignore
  2. BIN
      Test2.db
  3. 1 1
      set_mark/start.py

+ 1 - 0
.gitignore

@@ -8,6 +8,7 @@ set_mark/__pycache__
 opennamu.db
 back_opennamu.db
 Test.db
+Test2.db
 image
 robots.txt
 

BIN
Test2.db


+ 1 - 1
set_mark/start.py

@@ -555,7 +555,7 @@ def start(conn, data, title, lang):
     # [목차(없음)] 처리
     if not re.search('\[(?:목차|tableofcontents)\((?:없음|no)\)\]\n', data):
         if not re.search('\[(?:목차|tableofcontents)\]', data):
-            data = re.sub('\n(?P<in>={1,6}) ?(?P<out>(?:(?!=).)+) ?={1,6}\n', '\n[(?:목차|tableofcontents)]\n\g<in> \g<out> \g<in>\n', data, 1)
+            data = re.sub('\n(?P<in>={1,6}) ?(?P<out>(?:(?!=).)+) ?={1,6}\n', '\n[목차]\n\g<in> \g<out> \g<in>\n', data, 1)
     else:
         data = re.sub('\[(?:목차|tableofcontents)\((?:없음|no)\)\]\n', '', data)