From 38d307c68439f37cd8fa090e952faf449b091bdb Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Tue, 12 Apr 2022 00:53:48 -0400 Subject: [PATCH] Fix sometimes-broken inbound mentions --- matrix_appservice_kakaotalk/formatter/from_kakaotalk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix_appservice_kakaotalk/formatter/from_kakaotalk.py b/matrix_appservice_kakaotalk/formatter/from_kakaotalk.py index d1ed85e..ffb0a75 100644 --- a/matrix_appservice_kakaotalk/formatter/from_kakaotalk.py +++ b/matrix_appservice_kakaotalk/formatter/from_kakaotalk.py @@ -29,7 +29,7 @@ _END = r"$|\s" _TEXT_NO_SURROUNDING_SPACE = r"(?:[^\s].*?[^\s])|[^\s]" COMMON_REGEX = re.compile(rf"({_START})([_~*])({_TEXT_NO_SURROUNDING_SPACE})\2({_END})") INLINE_CODE_REGEX = re.compile(rf"({_START})(`)(.+?)`({_END})") -MENTION_REGEX = re.compile(r"@([0-9]{1,15})\u2063(.+?)\u2063") +MENTION_REGEX = re.compile(r"@(\d+)\u2063(.+?)\u2063") tags = {"_": "em", "*": "strong", "~": "del", "`": "code"}