-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement markdown support for botogram
This also detects automatically if you're using markdown in your messages, so you don't have to specify it everytime you use it. Please note that markdown support isn't implemented yet in every Telegram client, but (currently) only on the Android and web clients.
- Loading branch information
Pietro Albini
committed
Oct 6, 2015
1 parent
429995c
commit d4f3bdd
Showing
6 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,3 +63,13 @@ def test_usernames_in(): | |
|
||
username_url = botogram.utils.usernames_in("http://pwd:[email protected]") | ||
assert username_url == [] | ||
|
||
|
||
def test_is_markdown(): | ||
assert not botogram.utils.is_markdown("not markdown, sorry!") | ||
assert not botogram.utils.is_markdown("*all [wonderfully](broken syntax`") | ||
assert botogram.utils.is_markdown("*a*") | ||
assert botogram.utils.is_markdown("_a_") | ||
assert botogram.utils.is_markdown("[a](b)") | ||
assert botogram.utils.is_markdown("`a`") | ||
assert botogram.utils.is_markdown("```a```") |