0000860: GEDCOM: Space in gramps id fails to properly export/import
svn: r22500
This commit is contained in:
parent
85c0f37905
commit
023528e9cd
@ -743,11 +743,19 @@ class Lexer(object):
|
|||||||
level = int(line[0])
|
level = int(line[0])
|
||||||
# there should only be one space after the level,
|
# there should only be one space after the level,
|
||||||
# but we can ignore more,
|
# but we can ignore more,
|
||||||
|
line = line[2].lstrip(' ')
|
||||||
# then split into tag+delim+line_value
|
# then split into tag+delim+line_value
|
||||||
# or xfef_id+delim+rest
|
# or xfef_id+delim+rest
|
||||||
line = line[2].lstrip(' ').partition(' ')
|
# the xref_id can have spaces in it
|
||||||
tag = line[0]
|
if line.startswith('@'):
|
||||||
line_value = line[2]
|
line = line.split('@', 2)
|
||||||
|
# line is now [None, alphanum+pointer_string, rest]
|
||||||
|
tag = '@' + line[1] + '@'
|
||||||
|
line_value = line[2]
|
||||||
|
else:
|
||||||
|
line = line.partition(' ')
|
||||||
|
tag = line[0]
|
||||||
|
line_value = line[2]
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user