diff --git a/generate.py b/generate.py
index 4b74e2a..7d00e8c 100755
--- a/generate.py
+++ b/generate.py
@@ -200,7 +200,7 @@ def load_and_replace(bibtex_file):
if group_by_year:
for pub in pubs:
- m = re.search('(\d{4})', pub['year'])
+ m = re.search(r'(\d{4})', pub['year'])
assert m is not None
pub['year_int'] = int(m.group(1))
@@ -266,12 +266,12 @@ def _format_author_list(immut_author_list):
if len(k) > 0:
assert len(k) == 1, k
url = author_urls[k[0]]
- new_auth = f"\href{{{url}}}{{{new_auth}}}"
+ new_auth = fr"\href{{{url}}}{{{new_auth}}}"
if config['name'] in new_auth:
new_auth = r"\textbf{" + new_auth + r"}"
new_auth = new_auth.replace('. ', '.~')
- new_auth = '\mbox{' + new_auth + '}'
+ new_auth = r'\mbox{' + new_auth + '}'
formatted_authors.append(new_auth)
return formatted_authors
@@ -302,7 +302,7 @@ def _get_pub_str(pub, prefix, gidx):
links = ' '.join(links)
highlight = 'selected' in pub and pub['selected'].lower() == 'true'
- highlight_color = '\cellcolor{tab_highlight}' if highlight else ''
+ highlight_color = r'\cellcolor{tab_highlight}' if highlight else ''
if '_note' in pub:
# note_str = r'{} && \textbf{{{}}} \\'.format(
note_str = f"({pub['_note']})"
@@ -340,7 +340,7 @@ def load_and_replace(bibtex_file):
if group_by_year:
for pub in pubs:
- m = re.search('(\d{4})', pub['year'])
+ m = re.search(r'(\d{4})', pub['year'])
assert m is not None
pub['year_int'] = int(m.group(1))
@@ -402,7 +402,7 @@ def add_repo_data(context, config, in_tex):
assert 'year' in item
assert 'github' in item['repo_url']
- short_name = re.search('.*github\.com/(.*)', item['repo_url'])[1]
+ short_name = re.search(r'.*github\.com/(.*)', item['repo_url'])[1]
if 'name' not in item:
item['name'] = short_name.replace('_', '\\_') if in_tex else short_name
@@ -602,7 +602,7 @@ def write_to_outfile(self, output_data):
(r'\\ ', ' '), # spaces
(r'\\&', '&'), # unescape &
(r'\\_', '_'), # unescape _
- (r'\\\$', '\$'), # unescape $
+ (r'\\\$', r'\$'), # unescape $
(r'\\%', '%'), # unescape %
(r'\\textbf{(.*?)}', r'\1'), # bold text
(r'\{ *\\bf *(.*?)\}', r'\1'),