Skip to content

Commit

Permalink
Further ensure keywords have proper format
Browse files Browse the repository at this point in the history
  • Loading branch information
hvidy committed Apr 16, 2024
1 parent d55ddbf commit 78b5b80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/scripts/write_repo_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@
keywords += data["software"]["keywords"]

#ensure keywords have valid format
keywords = [item[:50].lower() for item in keywords]
def sanitize_string(s):
return re.sub(r'[^a-z0-9-]','-', s)

keywords = [sanitize_string(item[:50].lower()) for item in keywords]

print(keywords)

Expand Down

0 comments on commit 78b5b80

Please sign in to comment.