diff --git a/src/core/slack.py b/src/core/slack.py index 3f0a6ee..885d53a 100644 --- a/src/core/slack.py +++ b/src/core/slack.py @@ -85,7 +85,7 @@ async def request_upload_via_dm(user_id: str, announcement_text: str) -> None: "user": user_id, } ) - + await client.chat_postMessage( channel=user_id, text=SLACK_JUMPSTART_MESSAGE, blocks=message ) diff --git a/src/core/wikithoughts.py b/src/core/wikithoughts.py index 3a14c51..ea430c1 100644 --- a/src/core/wikithoughts.py +++ b/src/core/wikithoughts.py @@ -46,10 +46,9 @@ # Precompile all the Regex operations -RE_LINK: Pattern[str] = re.compile( - r'\[https?://[^\s"]+\s+"?([^\]"]+)"?\]' -) # Https Links -RE_FILE_IMAGE = re.compile(r"\[\[(?:File|Image):[^\[\]]*\]\]", re.IGNORECASE) +RE_LINK: Pattern[str] = re.compile(r'\[https?://[^\s"]+\s+"?([^\]"]+)"?\]') +RE_FILE: Pattern[str] = re.compile(r"\[\[File:[^\]]*\]\]", re.IGNORECASE) +RE_IMAGE: Pattern[str] = re.compile(r"\[\[Image:[^\]]*\]\]", re.IGNORECASE) RE_PAGE_TEXT: Pattern[str] = re.compile(r"\[\[[^\|\]]*\|([^\]]+)\]\]") RE_PAGE: Pattern[str] = re.compile(r"\[\[([^\]]+)\]\]") RE_CSH: Pattern[str] = re.compile(r"\^\^([^^]+)\^\^") @@ -70,10 +69,11 @@ def clean_wikitext(text: str) -> str: """ reg_operations: tuple[Pattern[str]] = ( - RE_PAGE, - RE_FILE_IMAGE, + RE_FILE, + RE_IMAGE, RE_LINK, RE_PAGE_TEXT, + RE_PAGE, RE_CSH, RE_TEMPLATE, RE_HTML,