Skip to content

Commit

Permalink
Handle markdown links
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan committed Nov 27, 2024
1 parent ff986bd commit 8ae1b32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gh-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def process_labels(labels):


def get_url(text):
m = re.search(r"\b(https?://\S+)", text)
# get the first url (maybe in markdown link) and remove trailing comma
m = re.search(r"\b(https?://[^\)\s]+)", text)
if m:
url = m.group()
if url.endswith(','):
Expand Down

0 comments on commit 8ae1b32

Please sign in to comment.