remove stock tags from markdown

now it just adds new tags instead of replicating the default behaviour of the clients
This commit is contained in:
udf 2018-11-02 18:25:04 +02:00
parent 5da937756b
commit ddeb468a79
Signed by untrusted user: kate
GPG Key ID: E40724BAD73AF77B
1 changed files with 0 additions and 8 deletions

View File

@ -65,18 +65,10 @@ def parse_snip(m):
return m.group(1), None
PARSED_ENTITIES = (
MessageEntityBold, MessageEntityItalic, MessageEntityCode,
MessageEntityPre, MessageEntityTextUrl
)
# A matcher is a tuple of (regex pattern, parse function)
# where the parse function takes the match and returns (text, entity)
MATCHERS = [
(DEFAULT_URL_RE, parse_url_match),
(get_tag_parser('**', MessageEntityBold)),
(get_tag_parser('__', MessageEntityItalic)),
(get_tag_parser('```', partial(MessageEntityPre, language=''))),
(get_tag_parser('`', MessageEntityCode)),
(re.compile(r'\+\+(.+?)\+\+'), parse_aesthetics),
(re.compile(r'([^/\w]|^)(/?(r/\w+))'), parse_subreddit),
(re.compile(r'(!\w+)'), parse_snip)