Skip to content

Commit

Permalink
Fix #543. Should use raw string as these are invalid escape sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
lieryan committed Nov 27, 2022
1 parent b991a15 commit f47a05e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/tag-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def get_changelog(version):
search_heading = f"# Release {version}"
curdate = datetime.today().date().isoformat()

headings = re.findall("# Release \d+\.\d+\.\d+", s)
headings = re.findall(r"# Release \d+\.\d+\.\d+", s)
version_heading_index = headings.index(search_heading)
version_changelog = s[
s.index(headings[version_heading_index]) : s.index(
Expand All @@ -32,7 +32,7 @@ def get_changelog(version):

def remove_headings(version_changelog):
# Remove Markdown-style headings as it matches Git comment syntax
version_changelog = re.sub("^#+\s+", "", version_changelog, flags=re.MULTILINE)
version_changelog = re.sub(r"^#+\s+", "", version_changelog, flags=re.MULTILINE)
return version_changelog


Expand Down

0 comments on commit f47a05e

Please sign in to comment.