Skip to content

Commit

Permalink
added r to regex strings
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonfreitas committed Feb 17, 2024
1 parent 8de67f5 commit 340f3cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


def extract_repo(url):
reu = re.compile('^https://github.com/([\w-]+/[-\w\.]+)$')
reu = re.compile(r'^https://github.com/([\w-]+/[-\w\.]+)$')
m = reu.match(url)
if m:
return m.group(1)
Expand Down Expand Up @@ -63,8 +63,8 @@ def run(self):
projects = []

with open('README.md', 'r', encoding='utf8') as f:
ret = re.compile('^(#+) (.*)$')
rex = re.compile('^\s*- \[(.*)\]\((.*)\) - (.*)$')
ret = re.compile(r'^(#+) (.*)$')
rex = re.compile(r'^\s*- \[(.*)\]\((.*)\) - (.*)$')
m_titles = []
last_head_level = 0
for line in f:
Expand Down

0 comments on commit 340f3cf

Please sign in to comment.