2DU 9 лет назад
Родитель
Сommit
41434dea73
1 измененных файлов с 35 добавлено и 35 удалено
  1. 35 35
      mark.py

+ 35 - 35
mark.py

@@ -710,12 +710,12 @@ def namumark(session, title, data):
                 namu += [results[0]]
                 namu += [results[0]]
                 namu += [results[1]]
                 namu += [results[1]]
 
 
-                tou = tou + "<span class='footnote-list'><a href=\"#rfn-" + str(a) + "\" id=\"fn-" + str(a) + "\">[" + results[0] + "]</a> " + results[1] + "</span><br>"
+                tou += "<span class='footnote-list'><a href=\"#rfn-" + str(a) + "\" id=\"fn-" + str(a) + "\">[" + results[0] + "]</a> " + results[1] + "</span><br>"
                 data = re.sub("\[\*([^\s]*)(?:\s(((?!\]).)*))?\]", "<sup><a href='javascript:void(0);' id=\"rfn-" + str(a) + "\" onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[" + results[0] + "]</a></sup><span class='foot' id='footnote_" + str(a) + "' style='display:none;'><a class=\"footnotes\" href=\"#fn-" + str(a) + "\" onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[" + results[0] + "]</a> <a href='javascript:void(0);' onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[X]</a> " + results[1] + "</span>", data, 1)
                 data = re.sub("\[\*([^\s]*)(?:\s(((?!\]).)*))?\]", "<sup><a href='javascript:void(0);' id=\"rfn-" + str(a) + "\" onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[" + results[0] + "]</a></sup><span class='foot' id='footnote_" + str(a) + "' style='display:none;'><a class=\"footnotes\" href=\"#fn-" + str(a) + "\" onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[" + results[0] + "]</a> <a href='javascript:void(0);' onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[X]</a> " + results[1] + "</span>", data, 1)
                 
                 
                 
                 
             else:
             else:
-                tou = tou + "<span class='footnote-list'><a href=\"#rfn-" + str(a) + "\" id=\"fn-" + str(a) + "\">[" + str(a) + "]</a> " + results[1] + "</span><br>"
+                tou += "<span class='footnote-list'><a href=\"#rfn-" + str(a) + "\" id=\"fn-" + str(a) + "\">[" + str(a) + "]</a> " + results[1] + "</span><br>"
                 data = re.sub("\[\*([^\s]*)(?:\s(((?!\]).)*))?\]", "<sup><a href='javascript:void(0);' id=\"rfn-" + str(a) + "\" onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[" + str(a) + "]</a></sup><span class='foot' id='footnote_" + str(a) + "' style='display:none;'><a class=\"footnotes\" href=\"#fn-" + str(a) + "\" onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[" + str(a) + "]</a> <a href='javascript:void(0);' onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[X]</a> " + results[1] + "</span>", data, 1)
                 data = re.sub("\[\*([^\s]*)(?:\s(((?!\]).)*))?\]", "<sup><a href='javascript:void(0);' id=\"rfn-" + str(a) + "\" onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[" + str(a) + "]</a></sup><span class='foot' id='footnote_" + str(a) + "' style='display:none;'><a class=\"footnotes\" href=\"#fn-" + str(a) + "\" onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[" + str(a) + "]</a> <a href='javascript:void(0);' onclick=\"var f=document.getElementById('footnote_" + str(a) + "');var s=f.style.display=='inline';f.style.display=s?'none':'inline';this.className=s?'':'opened';\">[X]</a> " + results[1] + "</span>", data, 1)
 
 
             a += 1
             a += 1
@@ -730,10 +730,10 @@ def namumark(session, title, data):
     data = re.sub("\[각주\](?:(?:<br>| |\r|\n)+)?$", "", data)
     data = re.sub("\[각주\](?:(?:<br>| |\r|\n)+)?$", "", data)
     data = re.sub("(?:(?:<br>| |\r|\n)+)$", "", data)
     data = re.sub("(?:(?:<br>| |\r|\n)+)$", "", data)
     data = re.sub("\[각주\]", "<br>" + tou, data)
     data = re.sub("\[각주\]", "<br>" + tou, data)
-    data = data + tou
+    data += tou
     
     
     if(category):
     if(category):
-        data = data + '<div style="width:100%;border: 1px solid #777;padding: 5px;margin-top: 1em;">분류: ' + category + '</div>'
+        data += '<div style="width:100%;border: 1px solid #777;padding: 5px;margin-top: 1em;">분류: ' + category + '</div>'
         
         
     data = re.sub("(?:\|\|\r\n)", "#table#<nobr>", data)
     data = re.sub("(?:\|\|\r\n)", "#table#<nobr>", data)
         
         
@@ -776,28 +776,28 @@ def namumark(session, title, data):
                         e = re.search("&lt;table\s?align=((?:(?!&gt;).)*)&gt;", result[1])
                         e = re.search("&lt;table\s?align=((?:(?!&gt;).)*)&gt;", result[1])
                         if(q):
                         if(q):
                             resultss = q.groups()
                             resultss = q.groups()
-                            alltable = alltable + 'width:' + resultss[0] + ';'
+                            alltable += 'width:' + resultss[0] + ';'
                         if(w):
                         if(w):
                             resultss = w.groups()
                             resultss = w.groups()
-                            alltable = alltable + 'height:' + resultss[0] + ';'
+                            alltable += 'height:' + resultss[0] + ';'
                         if(e):
                         if(e):
                             resultss = e.groups()
                             resultss = e.groups()
                             if(resultss[0] == 'right'):
                             if(resultss[0] == 'right'):
-                                alltable = alltable + 'margin-left:auto;'
+                                alltable += + 'margin-left:auto;'
                             elif(resultss[0] == 'center'):
                             elif(resultss[0] == 'center'):
-                                alltable = alltable + 'margin:auto;'
+                                alltable += 'margin:auto;'
                             else:
                             else:
-                                alltable = alltable + 'margin-right:auto;'
+                                alltable += 'margin-right:auto;'
                                 
                                 
                         ee = re.search("&lt;table\s?textalign=((?:(?!&gt;).)*)&gt;", result[1])
                         ee = re.search("&lt;table\s?textalign=((?:(?!&gt;).)*)&gt;", result[1])
                         if(ee):
                         if(ee):
                             resultss = ee.groups()
                             resultss = ee.groups()
                             if(resultss[0] == 'right'):
                             if(resultss[0] == 'right'):
-                                alltable = alltable + 'text-align:right;'
+                                alltable += 'text-align:right;'
                             elif(resultss[0] == 'center'):
                             elif(resultss[0] == 'center'):
-                                alltable = alltable + 'text-align:center;'
+                                alltable += 'text-align:center;'
                             else:
                             else:
-                                alltable = alltable + 'text-align:left;'
+                                alltable += 'text-align:left;'
                         
                         
                         r = re.search("&lt;-((?:(?!&gt;).)*)&gt;", result[1])
                         r = re.search("&lt;-((?:(?!&gt;).)*)&gt;", result[1])
                         if(r):
                         if(r):
@@ -816,88 +816,88 @@ def namumark(session, title, data):
                         bc = re.search("&lt;rowbgcolor=(\w+)&gt;", result[1])
                         bc = re.search("&lt;rowbgcolor=(\w+)&gt;", result[1])
                         if(ba):
                         if(ba):
                             resultss = ba.groups()
                             resultss = ba.groups()
-                            rowstyle = rowstyle + 'background:' + resultss[0] + ';'
+                            rowstyle += 'background:' + resultss[0] + ';'
                         elif(bb):
                         elif(bb):
                             resultss = bb.groups()
                             resultss = bb.groups()
-                            rowstyle = rowstyle + 'background:' + resultss[0] + ';'
+                            rowstyle += 'background:' + resultss[0] + ';'
                         elif(bc):
                         elif(bc):
                             resultss = bc.groups()
                             resultss = bc.groups()
-                            rowstyle = rowstyle + 'background:' + resultss[0] + ';'
+                            rowstyle += 'background:' + resultss[0] + ';'
                             
                             
                         z = re.search("&lt;table\s?bordercolor=(#[0-9a-f-A-F]{6})&gt;", result[1])
                         z = re.search("&lt;table\s?bordercolor=(#[0-9a-f-A-F]{6})&gt;", result[1])
                         x = re.search("&lt;table\s?bordercolor=(#[0-9a-f-A-F]{3})&gt;", result[1])
                         x = re.search("&lt;table\s?bordercolor=(#[0-9a-f-A-F]{3})&gt;", result[1])
                         c = re.search("&lt;table\s?bordercolor=(\w+)&gt;", result[1])
                         c = re.search("&lt;table\s?bordercolor=(\w+)&gt;", result[1])
                         if(z):
                         if(z):
                             resultss = z.groups()
                             resultss = z.groups()
-                            alltable = alltable + 'border:' + resultss[0] + ' 2px solid;'
+                            alltable += 'border:' + resultss[0] + ' 2px solid;'
                         elif(x):
                         elif(x):
                             resultss = x.groups()
                             resultss = x.groups()
-                            alltable = alltable + 'border:' + resultss[0] + ' 2px solid;'
+                            alltable += 'border:' + resultss[0] + ' 2px solid;'
                         elif(c):
                         elif(c):
                             resultss = c.groups()
                             resultss = c.groups()
-                            alltable = alltable + 'border:' + resultss[0] + ' 2px solid;'
+                            alltable += 'border:' + resultss[0] + ' 2px solid;'
                             
                             
                         aq = re.search("&lt;table\s?bgcolor=(#[0-9a-f-A-F]{6})&gt;", result[1])
                         aq = re.search("&lt;table\s?bgcolor=(#[0-9a-f-A-F]{6})&gt;", result[1])
                         aw = re.search("&lt;table\s?bgcolor=(#[0-9a-f-A-F]{3})&gt;", result[1])
                         aw = re.search("&lt;table\s?bgcolor=(#[0-9a-f-A-F]{3})&gt;", result[1])
                         ae = re.search("&lt;table\s?bgcolor=(\w+)&gt;", result[1])
                         ae = re.search("&lt;table\s?bgcolor=(\w+)&gt;", result[1])
                         if(aq):
                         if(aq):
                             resultss = aq.groups()
                             resultss = aq.groups()
-                            alltable = alltable + 'background:' + resultss[0] + ';'
+                            alltable += 'background:' + resultss[0] + ';'
                         elif(aw):
                         elif(aw):
                             resultss = aw.groups()
                             resultss = aw.groups()
-                            alltable = alltable + 'background:' + resultss[0] + ';'
+                            alltable += 'background:' + resultss[0] + ';'
                         elif(ae):
                         elif(ae):
                             resultss = ae.groups()
                             resultss = ae.groups()
-                            alltable = alltable + 'background:' + resultss[0] + ';'
+                            alltable += 'background:' + resultss[0] + ';'
                             
                             
                         j = re.search("&lt;bgcolor=(#[0-9a-f-A-F]{6})&gt;", result[1])
                         j = re.search("&lt;bgcolor=(#[0-9a-f-A-F]{6})&gt;", result[1])
                         k = re.search("&lt;bgcolor=(#[0-9a-f-A-F]{3})&gt;", result[1])
                         k = re.search("&lt;bgcolor=(#[0-9a-f-A-F]{3})&gt;", result[1])
                         l = re.search("&lt;bgcolor=(\w+)&gt;", result[1])
                         l = re.search("&lt;bgcolor=(\w+)&gt;", result[1])
                         if(j):
                         if(j):
                             resultss = j.groups()
                             resultss = j.groups()
-                            celstyle = celstyle + 'background:' + resultss[0] + ';'
+                            celstyle += 'background:' + resultss[0] + ';'
                         elif(k):
                         elif(k):
                             resultss = k.groups()
                             resultss = k.groups()
-                            celstyle = celstyle + 'background:' + resultss[0] + ';'
+                            celstyle += 'background:' + resultss[0] + ';'
                         elif(l):
                         elif(l):
                             resultss = l.groups()
                             resultss = l.groups()
-                            celstyle = celstyle + 'background:' + resultss[0] + ';'
+                            celstyle += 'background:' + resultss[0] + ';'
                             
                             
                         aa = re.search("&lt;(#[0-9a-f-A-F]{6})&gt;", result[1])
                         aa = re.search("&lt;(#[0-9a-f-A-F]{6})&gt;", result[1])
                         ab = re.search("&lt;(#[0-9a-f-A-F]{3})&gt;", result[1])
                         ab = re.search("&lt;(#[0-9a-f-A-F]{3})&gt;", result[1])
                         ac = re.search("&lt;(\w+)&gt;", result[1])
                         ac = re.search("&lt;(\w+)&gt;", result[1])
                         if(aa):
                         if(aa):
                             resultss = aa.groups()
                             resultss = aa.groups()
-                            celstyle = celstyle + 'background:' + resultss[0] + ';'
+                            celstyle += 'background:' + resultss[0] + ';'
                         elif(ab):
                         elif(ab):
                             resultss = ab.groups()
                             resultss = ab.groups()
-                            celstyle = celstyle + 'background:' + resultss[0] + ';'
+                            celstyle += 'background:' + resultss[0] + ';'
                         elif(ac):
                         elif(ac):
                             resultss = ac.groups()
                             resultss = ac.groups()
-                            celstyle = celstyle + 'background:' + resultss[0] + ';'
+                            celstyle += 'background:' + resultss[0] + ';'
                             
                             
                         qa = re.search("&lt;width=((?:(?!&gt;).)*)&gt;", result[1])
                         qa = re.search("&lt;width=((?:(?!&gt;).)*)&gt;", result[1])
                         qb = re.search("&lt;height=((?:(?!&gt;).)*)&gt;", result[1])
                         qb = re.search("&lt;height=((?:(?!&gt;).)*)&gt;", result[1])
                         if(qa):
                         if(qa):
                             resultss = qa.groups()
                             resultss = qa.groups()
-                            celstyle = celstyle + 'width:' + resultss[0] + ';'
+                            celstyle += 'width:' + resultss[0] + ';'
                         if(qb):
                         if(qb):
                             resultss = qb.groups()
                             resultss = qb.groups()
-                            celstyle = celstyle + 'height:' + resultss[0] + ';'
+                            celstyle += 'height:' + resultss[0] + ';'
                             
                             
                         i = re.search("&lt;\)&gt;", result[1])
                         i = re.search("&lt;\)&gt;", result[1])
                         o = re.search("&lt;:&gt;", result[1])
                         o = re.search("&lt;:&gt;", result[1])
                         p = re.search("&lt;\(&gt;", result[1])
                         p = re.search("&lt;\(&gt;", result[1])
                         if(i):
                         if(i):
-                            celstyle = celstyle + 'text-align:right;'
+                            celstyle += 'text-align:right;'
                         elif(o):
                         elif(o):
-                            celstyle = celstyle + 'text-align:center;'
+                            celstyle += 'text-align:center;'
                         elif(p):
                         elif(p):
-                            celstyle = celstyle + 'text-align:left;'
+                            celstyle += 'text-align:left;'
                             
                             
-                        alltable = alltable + '"'
-                        celstyle = celstyle + '"'
-                        rowstyle = rowstyle + '"'
+                        alltable += '"'
+                        celstyle += '"'
+                        rowstyle += '"'
                             
                             
                         table = re.sub("^(\|\|(?:(?:\|\|)+)?)((?:&lt;(?:(?:(?!&gt;).)*)&gt;)+)?", "<table " + alltable + "><tbody><tr " + rowstyle + "><td " + cel + " " + row + " " + celstyle + ">", table, 1)
                         table = re.sub("^(\|\|(?:(?:\|\|)+)?)((?:&lt;(?:(?:(?!&gt;).)*)&gt;)+)?", "<table " + alltable + "><tbody><tr " + rowstyle + "><td " + cel + " " + row + " " + celstyle + ">", table, 1)
                     else:
                     else: