2007-08-19 Don Allingham <don@gramps-project.org>
* src/GrampsDbUtils/_WriteGedcom.py (breakup): fix index check svn: r8840
This commit is contained in:
parent
95ceb4e904
commit
62044e33a1
@ -1,3 +1,6 @@
|
||||
2007-08-19 Don Allingham <don@gramps-project.org>
|
||||
* src/GrampsDbUtils/_WriteGedcom.py (breakup): fix index check
|
||||
|
||||
2007-08-19 Robert Cawley <rjc@cawley.id.au>
|
||||
* src/plugins/DetDescendantReport.py:
|
||||
* src/plugins/DetAncestralReport.py:
|
||||
|
@ -233,12 +233,13 @@ def breakup(txt, limit):
|
||||
to avoid issues with spaces.
|
||||
"""
|
||||
data = []
|
||||
original = txt
|
||||
while limit < len(txt)+1:
|
||||
idx = limit-1
|
||||
while txt[idx] in string.whitespace or txt[idx+1] in string.whitespace :
|
||||
while txt[idx-1] in string.whitespace or txt[idx] in string.whitespace :
|
||||
idx -= 1
|
||||
data.append(txt[:idx+1])
|
||||
txt = txt[idx+1:]
|
||||
data.append(txt[:idx])
|
||||
txt = txt[idx:]
|
||||
if len(txt) > 0:
|
||||
data.append(txt)
|
||||
return data
|
||||
|
Loading…
Reference in New Issue
Block a user