diff --git a/elixir/data.py b/elixir/data.py index b952943..86d1d23 100755 --- a/elixir/data.py +++ b/elixir/data.py @@ -25,8 +25,8 @@ import os import os.path import errno -deflist_regex = re.compile(b'(\d*)(\w)(\d*)(\w),?') -deflist_macro_regex = re.compile('\dM\d+(\w)') +deflist_regex = re.compile(rb'(\d*)(\w)(\d*)(\w),?') +deflist_macro_regex = re.compile(r'\dM\d+(\w)') ################################################################################## diff --git a/elixir/web.py b/elixir/web.py index 324a788..1e0588d 100755 --- a/elixir/web.py +++ b/elixir/web.py @@ -560,7 +560,7 @@ def generate_source(q: Query, project: str, version: str, path: str) -> str: html_code_block = format_code(fname, code) # Replace line numbers by links to the corresponding line in the current file - html_code_block = sub('href="#codeline-(\d+)', 'name="L\\1" id="L\\1" href="#L\\1', html_code_block) + html_code_block = sub(r'href="#codeline-(\d+)', 'name="L\\1" id="L\\1" href="#L\\1', html_code_block) for f in filters: html_code_block = f.untransform_formatted_code(filter_ctx, html_code_block)