6277: Out of index when creating textreort with PDF format
svn: r20994
This commit is contained in:
parent
c194bda8ce
commit
e84ccb92db
@ -651,6 +651,7 @@ class GtkDocParagraph(GtkDocBaseElement):
|
|||||||
pos = 0
|
pos = 0
|
||||||
realpos = 0
|
realpos = 0
|
||||||
markstarts = []
|
markstarts = []
|
||||||
|
#index is in bytecode in the text.. !!
|
||||||
while pos < index:
|
while pos < index:
|
||||||
char = oldtext[realpos]
|
char = oldtext[realpos]
|
||||||
if char == '<' and oldtext[realpos+1] != '/':
|
if char == '<' and oldtext[realpos+1] != '/':
|
||||||
@ -663,7 +664,7 @@ class GtkDocParagraph(GtkDocBaseElement):
|
|||||||
realpos = realpos + oldtext[realpos:].find('>') + 1
|
realpos = realpos + oldtext[realpos:].find('>') + 1
|
||||||
markstarts.pop()
|
markstarts.pop()
|
||||||
else:
|
else:
|
||||||
pos +=1
|
pos += len(char.encode('utf-8'))
|
||||||
realpos += 1
|
realpos += 1
|
||||||
#now construct the marked up text to use
|
#now construct the marked up text to use
|
||||||
newtext = ''.join(markstarts)
|
newtext = ''.join(markstarts)
|
||||||
|
Loading…
Reference in New Issue
Block a user