[F] Positive look-ahead in regex matching

This commit is contained in:
Azalea Gui 2023-02-21 09:55:14 -05:00
parent 469dd762f2
commit 2b4a35f12b
No known key found for this signature in database
GPG key ID: E289FAC0DA92DD2B
2 changed files with 38 additions and 38 deletions

View file

@ -3,12 +3,12 @@
This script turns readme shorthand pull request references (i.e. dylanaraps/neofetch#1946) into full
GitHub pull request links.
"""
import re
import regex as re
from pathlib import Path
RE_SHORTHAND = re.compile(r"(\w+?)/(\w+?)#(\d+)")
MY_RE = re.compile(r"[^\w\[]#(\d+)")
MY_RE = re.compile(r"(?<=[^\w\[])#(\d+)")
def reformat_readme():