Update regex strings to be raw strings
This commit is contained in:
6
Text.py
6
Text.py
@@ -643,7 +643,7 @@ class MultiByteCoreTextMapper(object):
|
|||||||
linespace = wrap
|
linespace = wrap
|
||||||
line = lines.pop(0)
|
line = lines.pop(0)
|
||||||
|
|
||||||
match = re.search('^\{[A-Z0-9_:]+\}$', line)
|
match = re.search(r'^\{[A-Z0-9_:]+\}$', line)
|
||||||
if match:
|
if match:
|
||||||
if line == '{PAGEBREAK}':
|
if line == '{PAGEBREAK}':
|
||||||
if lineindex % 3 != 0:
|
if lineindex % 3 != 0:
|
||||||
@@ -662,13 +662,13 @@ class MultiByteCoreTextMapper(object):
|
|||||||
while words:
|
while words:
|
||||||
word = words.pop(0)
|
word = words.pop(0)
|
||||||
|
|
||||||
match = re.search('^(\{[A-Z0-9_:]+\}).*', word)
|
match = re.search(r'^(\{[A-Z0-9_:]+\}).*', word)
|
||||||
if match:
|
if match:
|
||||||
start_command = match.group(1)
|
start_command = match.group(1)
|
||||||
outbuf.extend(cls.special_commands[start_command])
|
outbuf.extend(cls.special_commands[start_command])
|
||||||
word = word.replace(start_command, '')
|
word = word.replace(start_command, '')
|
||||||
|
|
||||||
match = re.search('(\{[A-Z0-9_:]+\})\.?$', word)
|
match = re.search(r'(\{[A-Z0-9_:]+\})\.?$', word)
|
||||||
if match:
|
if match:
|
||||||
end_command = match.group(1)
|
end_command = match.group(1)
|
||||||
word = word.replace(end_command, '')
|
word = word.replace(end_command, '')
|
||||||
|
|||||||
Reference in New Issue
Block a user