Skip to content

Commit

Permalink
Fix string syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Oct 11, 2024
1 parent 0fe5a14 commit fc4fd48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/jnb.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ def py_file_to_string(src):

# Process remainder of source file
for line in srcfile:
if re.match("^input\(", line): # end processing when input statement encountered
if re.match(r"^input\(", line): # end processing when input statement encountered
break
line = re.sub('^r"""', '"""', line) # remove r from r"""
line = re.sub(":cite:\`([^`]+)\`", r'<cite data-cite="\1"/>', line) # fix cite format
line = re.sub(r":cite:\`([^`]+)\`", r'<cite data-cite="\1"/>', line) # fix cite format
lines.append(line)

# Backtrack through list of lines to remove trailing newlines
Expand Down

0 comments on commit fc4fd48

Please sign in to comment.