ソースを参照

버그 수정

2DU 9 年 前
コミット
68d8dead9a
1 ファイル変更2 行追加2 行削除
  1. 2 2
      app.py

+ 2 - 2
app.py

@@ -2017,13 +2017,13 @@ def secedit(name = None, number = None):
             if(rows):
                 i = 0
                 j = 0
-                gdata = rows[0]['data'] + '\n'                
+                gdata = rows[0]['data'] + '\r\n'                
                 while True:
                     m = re.search("((?:={1,6})\s?(?:[^=]*)\s?(?:={1,6})(?:\s+)?\n(?:(?:(?:(?!(?:={1,6})\s?(?:[^=]*)\s?(?:={1,6})(?:\s+)?\n).)*)(?:\n)?)+)", gdata)
                     if(m):
                         if(i == number - 1):
                             g = m.groups()
-                            gdata = g[0]
+                            gdata = re.sub("\r\n$", "", g[0])
                             break
                         else:
                             gdata = re.sub("((?:={1,6})\s?(?:[^=]*)\s?(?:={1,6})(?:\s+)?\n(?:(?:(?:(?!(?:={1,6})\s?(?:[^=]*)\s?(?:={1,6})(?:\s+)?\n).)*)(?:\n)?)+)", "", gdata, 1)