Skip to content

Commit

Permalink
misc: fix trimming wildcard tlds
Browse files Browse the repository at this point in the history
  • Loading branch information
JuxhinDB committed Feb 4, 2025
1 parent a94808d commit 5eb1cd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-tlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -31,4 +29,6 @@ jobs:

- name: Run update script
run: python twistrs/data/update-psl.py
with:
token: ${{ secrets.GITHUB_TOKEN }}

2 changes: 1 addition & 1 deletion twistrs/data/update-psl.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def parse_psl(psl_text):
if not line or line.startswith("//"):
continue
# Remove any leading exclamation marks or wildcards (e.g. "!city." or "*.")
cleaned = re.sub(r"^(?:!\*\.|!\.|!\*|[\*!]+)", "", line)
cleaned = re.sub(r"^(?:!\*\.|!\.|!\*|^[\*.!]+)", "", line)
valid_lines.append(cleaned)
return sorted(valid_lines)

Expand Down

0 comments on commit 5eb1cd5

Please sign in to comment.