Attempt to improve how Fenrir reads multiple characters in a row, e.g. [------].
This commit is contained in:
parent
ec6c135581
commit
7e87ebf04b
@ -38,7 +38,7 @@ class textManager():
|
||||
if name[0] == name[1]:
|
||||
newText += ' ' + str(numberOfChars) + ' ' + self.env['runtime']['punctuationManager'].proceedPunctuation(name[0], True) + ' '
|
||||
else:
|
||||
newText += ' ' + str(int(numberOfChars / 2)) + ' ' + self.env['runtime']['punctuationManager'].proceedPunctuation(name, True) + ' '
|
||||
newText += ' ' + self.env['runtime']['punctuationManager'].proceedPunctuation(name[0], True) + ' ' + str(int(numberOfChars / 2)) + ' ' + self.env['runtime']['punctuationManager'].proceedPunctuation(name[1], True) + ' '
|
||||
lastPos = span[1]
|
||||
if lastPos != 0:
|
||||
newText += ' '
|
||||
@ -46,7 +46,7 @@ class textManager():
|
||||
lastPos = 0
|
||||
for match in self.regExSingle.finditer(newText):
|
||||
span = match.span()
|
||||
result += text[lastPos:span[0]]
|
||||
result += newText[lastPos:span[0]]
|
||||
numberOfChars = len(newText[span[0]:span[1]])
|
||||
name = newText[span[0]:span[1]][:2]
|
||||
if not self.env['runtime']['punctuationManager'].isPuctuation(name[0]):
|
||||
@ -55,7 +55,7 @@ class textManager():
|
||||
if name[0] == name[1]:
|
||||
result += ' ' + str(numberOfChars) + ' ' + self.env['runtime']['punctuationManager'].proceedPunctuation(name[0], True) + ' '
|
||||
else:
|
||||
result += ' ' + str(int(numberOfChars / 2)) + ' ' + self.env['runtime']['punctuationManager'].proceedPunctuation(name, True) + ' '
|
||||
result += ' ' + self.env['runtime']['punctuationManager'].proceedPunctuation(name[0], True) + ' ' + str(int(numberOfChars / 2)) + ' ' + self.env['runtime']['punctuationManager'].proceedPunctuation(name[1], True) + ' '
|
||||
lastPos = span[1]
|
||||
if lastPos != 0:
|
||||
result += ' '
|
||||
|
Loading…
x
Reference in New Issue
Block a user