Commit graph

33 commits

Author SHA1 Message Date
Dan
de02848a69 Revert "Delete style utils.py and move its content inside html.py The HTML parser is now the only one that makes use of those util methods"
This reverts commit cd1e41b1
2019-06-25 05:47:57 +02:00
Dan
cd1e41b130 Delete style utils.py and move its content inside html.py
The HTML parser is now the only one that makes use of those util methods
2019-06-24 14:33:17 +02:00
Dan
a27dc575e4 Actually fix the HTML Parser feeding by calling .close() when done 2019-06-24 14:17:46 +02:00
Dan
cac0bcabf9 Fix HTML parsing breaking with no tags 2019-06-24 13:36:27 +02:00
Dan
8e0182633f Ignore any other style when inside a fixed-width style 2019-06-24 13:35:58 +02:00
Dan
f12cee5d94 Automatically escape URL bodies when using markdown 2019-06-24 10:54:58 +02:00
Dan
d6900cde9f Remove debug print() 2019-06-24 10:11:21 +02:00
Dan
e7c49c6a1b Revamp HTML and Markdown parsers to allow multiple nested entities 2019-06-24 10:07:28 +02:00
Dan
648f37cf6d Add support for underline and strikethrough text via Markdown
New delimiters:

    - ~~strikethrough~~
    - --underline--
2019-06-23 22:43:11 +02:00
Dan
0985d7ad90 Enable parsing underline, strikethrough and blockquote text for HTML 2019-06-23 22:31:55 +02:00
Dan
ef5dd96bdc Fix broken mentions for both HTML and Markdown 2019-03-26 13:32:30 +01:00
Dan
acbbfabb27 Merge branch 'develop' into inline-mode
# Conflicts:
#	compiler/api/compiler.py
#	compiler/error/source/400_BAD_REQUEST.tsv
#	pyrogram/__init__.py
#	pyrogram/client/dispatcher/dispatcher.py
#	pyrogram/client/ext/utils.py
#	pyrogram/client/methods/bots/__init__.py
#	pyrogram/client/types/__init__.py
2019-03-21 17:40:49 +01:00
bakatrouble
081b9b280a Add ability to forward messages as copies (#227)
* Add ability to forward messages as copies

* Add Messages.forward() method

* Update and clean up code
2019-03-21 13:53:07 +01:00
Dan
34b51b6481 Force keyword arguments for all TL types 2019-03-16 16:53:52 +01:00
Dan
d69a93d253 Automatically cast message and caption arguments to str 2019-01-03 20:53:48 +01:00
Dan
4d7b1bafac Update copyright year 2019-01-01 12:36:16 +01:00
Dan
21dbbc3f0b Fix style parsers randomly returning "unsorted" dicts.
This is due to Python <3.6 having "unsorted" dicts. Dicts are inherently
unsorted, but starting from Python 3.6 they keep the order in which the
keys are inserted (useful for unpacking)
2018-12-31 17:13:50 +01:00
Dan
c5cedd880d Allow Markdown and HTML styles to work on an empty dict.
For inline results. User mentions are disabled this way
2018-10-15 14:29:23 +02:00
Dan
73c101b49d Revert "Add Empty parse mode"
This reverts commit d8dbcb5
2018-05-31 13:03:20 +02:00
Dan
d8dbcb5b4e Add Empty parse mode 2018-05-27 20:16:30 +02:00
Dan
afffd5b4af Allow entities to span in multiple lines 2018-05-12 10:51:24 +02:00
Dan
c0f61fd40c Add html unparse 2018-05-11 13:37:49 +02:00
Dan
89af1d0827 Fix unparse not taking surrogates into account 2018-05-10 15:25:01 +02:00
Dan
d41464e12e Small pattern fix 2018-05-10 15:11:13 +02:00
Dan
efeade88c1 Cleaner markdown 2018-05-10 15:07:03 +02:00
Dan
b334b06117 Add markdown unparse method 2018-05-10 14:46:14 +02:00
Dan
a0e3ab4199 Yet another markdown pattern fix 2018-03-23 08:27:23 +01:00
Dan
2fd7cd0054 Small fix in the markdown regex 2018-03-19 21:02:54 +01:00
Dan
e1b2fc7043 Revamp markdown parser 2018-02-15 12:05:35 +01:00
Dan
f35babc26a Fix HTML style parser not working properly. Fixes #21 2018-02-14 08:33:14 +01:00
Dan
63531dd1dd Fix regex pattern not matching single quotes 2018-02-05 01:50:32 +01:00
Dan
3e5421f55f Remove unused regex pattern 2018-01-23 18:16:46 +01:00
Dan
c39bf3043d Move formatting classes inside the Client sub-package 2018-01-23 15:17:48 +01:00