remove old stuff

This commit is contained in:
udf 2018-11-03 03:10:49 +02:00
parent ddeb468a79
commit f4a7e49cc1
Signed by: kate
GPG Key ID: E40724BAD73AF77B
1 changed files with 1 additions and 12 deletions

View File

@ -8,10 +8,7 @@ from telethon import events
from telethon.tl.functions.messages import EditMessageRequest from telethon.tl.functions.messages import EditMessageRequest
from telethon.extensions.markdown import DEFAULT_URL_RE from telethon.extensions.markdown import DEFAULT_URL_RE
from telethon.utils import add_surrogate, del_surrogate from telethon.utils import add_surrogate, del_surrogate
from telethon.tl.types import ( from telethon.tl.types import MessageEntityTextUrl
MessageEntityBold, MessageEntityItalic, MessageEntityCode,
MessageEntityPre, MessageEntityTextUrl
)
def parse_url_match(m): def parse_url_match(m):
@ -23,14 +20,6 @@ def parse_url_match(m):
return m.group(1), entity 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) PRINTABLE_ASCII = range(0x21, 0x7f)
def parse_aesthetics(m): def parse_aesthetics(m):
def aesthetify(string): def aesthetify(string):