From f4a7e49cc1359b2cfd4fef173db0704f9cb1e0ad Mon Sep 17 00:00:00 2001 From: udf Date: Sat, 3 Nov 2018 03:10:49 +0200 Subject: [PATCH] remove old stuff --- stdplugins/markdown.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/stdplugins/markdown.py b/stdplugins/markdown.py index 78e1782..e3e752b 100644 --- a/stdplugins/markdown.py +++ b/stdplugins/markdown.py @@ -8,10 +8,7 @@ from telethon import events from telethon.tl.functions.messages import EditMessageRequest from telethon.extensions.markdown import DEFAULT_URL_RE from telethon.utils import add_surrogate, del_surrogate -from telethon.tl.types import ( - MessageEntityBold, MessageEntityItalic, MessageEntityCode, - MessageEntityPre, MessageEntityTextUrl -) +from telethon.tl.types import MessageEntityTextUrl def parse_url_match(m): @@ -23,14 +20,6 @@ def parse_url_match(m): return m.group(1), entity -def get_tag_parser(tag, entity): - # TODO unescape escaped tags? - def tag_parser(m): - return m.group(1), entity(offset=m.start(), length=len(m.group(1))) - tag = re.escape(tag) - return re.compile(tag + r'(.+?)' + tag, re.DOTALL), tag_parser - - PRINTABLE_ASCII = range(0x21, 0x7f) def parse_aesthetics(m): def aesthetify(string):