Slight speed ups in the parser
svn: r481
This commit is contained in:
parent
4c0bfe2cea
commit
5d9d1e1968
@ -55,11 +55,12 @@ u2l = utf8_to_latin
|
|||||||
# Remove extraneous spaces
|
# Remove extraneous spaces
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def rs(text):
|
||||||
|
return string.join(string.split(text))
|
||||||
|
|
||||||
def fix_spaces(text_list):
|
def fix_spaces(text_list):
|
||||||
val = ""
|
return string.join(map(rs,text_list),'\n')
|
||||||
for text in text_list:
|
|
||||||
val = val + string.join(string.split(text),' ') + "\n"
|
|
||||||
return val
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -639,7 +640,7 @@ class GrampsParser(handler.ContentHandler):
|
|||||||
if self.address:
|
if self.address:
|
||||||
self.address.setDate(u2l(tag))
|
self.address.setDate(u2l(tag))
|
||||||
else:
|
else:
|
||||||
self.event.date.quick_set(u2l(tag))
|
self.event.setDate(u2l(tag))
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user