Skip to content

Commit 8b169be

Browse files
committed
Fix minor regex strings
1 parent 4e777f2 commit 8b169be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

JWLManager.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ def shorten_title(t):
11921192
return t
11931193
left = m.group(1)
11941194
l = 33 - len(left)
1195-
m = regex.search(f'\s(\w.{{0,{l}}})$', t)
1195+
m = regex.search(rf'\s(\w.{{0,{l}}})$', t)
11961196
if not m:
11971197
t = left + ' […]'
11981198
else:
@@ -1709,7 +1709,7 @@ def add_bookmark(attribs, location_id):
17091709
if '|' in line:
17101710
try:
17111711
count += 1
1712-
attribs = regex.split('\|', line.rstrip())
1712+
attribs = regex.split(r'\|', line.rstrip())
17131713
for i in [0,1,2,9,11]:
17141714
if attribs[i] == 'None':
17151715
attribs[i] = None
@@ -1792,7 +1792,7 @@ def add_publication_location(attribs):
17921792
if ('|' in line) and (line.strip() not in favorite_list):
17931793
try:
17941794
count += 1
1795-
attribs = regex.split('\|', line.rstrip())
1795+
attribs = regex.split(r'\|', line.rstrip())
17961796
attribs = [None if attr == 'None' else attr for attr in attribs]
17971797
location_id = add_publication_location(attribs)
17981798
if available_ids.get('TagMap'):
@@ -1885,7 +1885,7 @@ def add_usermark(attribs, location_id):
18851885
if regex.match(r'^(\d+\|){6}', line):
18861886
try:
18871887
count += 1
1888-
attribs = regex.split('\|', line.rstrip().replace('None', ''))
1888+
attribs = regex.split(r'\|', line.rstrip().replace('None', ''))
18891889
if attribs[6]:
18901890
location_id = add_scripture_location(attribs)
18911891
else:

0 commit comments

Comments
 (0)