12 line=re.sub(
' +',
' ',line)
13 line=re.sub(
' =',
'=',line)
14 line=re.sub(
'= ',
'=',line)
22 pieces=line.split(
" ")
24 if piece.startswith(_key+
"="):
25 _val=piece.split(
"\"")[1]
39 with open(_infname,
'r')
as _f:
42 if _wline.startswith(
"<h id=\""+_id+
"\""):
45 elif _wline.startswith(
"</h>"):
52 elif _withcomment
and _wline.startswith(
"<!--"):
54 _commbuff.append(_line)
55 if (
not re.search(
"-->",_wline) ):
62 _commbuff.append(_line)
63 if ( re.search(
"-->",_wline) ):
66 print(
'Warning', _infname,
'non-xml formatted line :', _line)
81 if _bitem.strip().startswith(
"<!--"):
83 _comm_def[0].
append(_bitem)
84 if ( re.search(
"-->",_bitem) ):
87 _comm_def[0].
append(_bitem)
88 if re.search(
"-->",_bitem):
91 _comm_def[1].
append(_bitem)
99 if _line.startswith(
"<")
or _line.endswith(
">"):
106 if _line.startswith(
"&"):