• R/O
  • SSH
  • HTTPS

mixedmark: Commit


Commit MetaInfo

Revision137 (tree)
Time2019-04-01 10:40:38
Authorksaito0717

Log Message

fix.

Change Summary

Incremental Difference

--- mm2xhtml/src/mm2xhtml/mmPostProcess.py (revision 136)
+++ mm2xhtml/src/mm2xhtml/mmPostProcess.py (revision 137)
@@ -129,7 +129,9 @@
129129
130130 level = 1
131131
132- for node in doc.documentElement.firstChild.childNodes:
132+ #for node in doc.documentElement.firstChild.childNodes:
133+ bodyElement = doc.getElementsByTagName("body")[0]
134+ for node in bodyElement.childNodes:
133135 #if node.nodeType ==xml.dom.minidom.Node.TEXT_NODE:
134136 # if node.data.strip() == "":
135137 # continue
@@ -196,7 +198,7 @@
196198 traverse(n,doc)
197199
198200 ret = ''
199- topLevelNode = doc.documentElement.firstChild.firstChild
201+ topLevelNode = doc.documentElement.firstChild
200202 while (topLevelNode):
201203 #ret = ret + topLevelNode.toxml('UTF-8')
202204 ret = ret + topLevelNode.toxml()
@@ -292,7 +294,7 @@
292294 traverse3(n,doc)
293295
294296 ret = ''
295- topLevelNode = doc.documentElement.firstChild.firstChild
297+ topLevelNode = doc.documentElement.firstChild
296298 while (topLevelNode):
297299 #ret = ret + topLevelNode.toxml('UTF-8')
298300 ret = ret + topLevelNode.toxml()
--- mm2xhtml/src/mm2xhtml/pukiwikiTable.py (revision 136)
+++ mm2xhtml/src/mm2xhtml/pukiwikiTable.py (revision 137)
@@ -93,9 +93,9 @@
9393 self.type = Row.NOT_TABLE_ROW
9494
9595 def initPipeRow(self,line):
96- line = string.strip(line)
97- cols = string.split(line[1:],'|')
98- lastCol = string.strip(cols[-1])
96+ line = line.strip()
97+ cols = line[1:].split('|')
98+ lastCol = cols[-1].strip()
9999 if lastCol == 'h':
100100 self.type = Row.HEADER_ROW
101101 cols = cols[:-1]
@@ -113,7 +113,7 @@
113113 self.cels = [Cel(col) for col in cols]
114114
115115 def initCommaRow(self,line):
116- line = string.strip(line)
116+ line = line.strip()
117117 cols = splitCSV(line[1:])
118118 self.type = Row.CSV_ROW
119119 self.cels = [Cel(col) for col in cols]
@@ -143,7 +143,7 @@
143143 tmp = values[x]
144144 if (tmp[0]=='"') and (tmp[-1]=='"'):
145145 tmp = tmp[1:-1]
146- tmp = string.replace(tmp,'""','"')
146+ tmp = tmp.replace('""','"')
147147 values[x] = tmp
148148 return values
149149
@@ -211,7 +211,7 @@
211211 continue
212212 for x in range(0,colNo-1):
213213 cel = row.cels[x]
214- text = string.strip(cel.orgText)
214+ text = cel.orgText.strip()
215215 if (row.type!=Row.CSV_ROW) and (text == '>'):
216216 colPropagation(x,y,cel.colspan+1,table)
217217 cel.colspan = -1
@@ -285,7 +285,7 @@
285285 # pukiwikiもそうみたいなのでいいかな.
286286 def calNonCSVRowStyle(row):
287287 for cel in row.cels:
288- s = string.split(cel.orgText,':')
288+ s = cel.orgText.split(':')
289289 endStyle = -1
290290 for x in range(len(s)):
291291 if LEFT_RE.match(s[x]):
@@ -330,7 +330,7 @@
330330 cel.align = 'text-align:center;'
331331 else:
332332 cel.align = 'text-align:right;'
333- cel.text = string.strip(cel.orgText)
333+ cel.text = cel.orgText.strip()
334334
335335 # 実際に表のデータを出力するための関数
336336 # ヘッダ,フッタ,それ以外の順に表示する
Show on old repository browser