-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Raw Block for User Formatted Text (#91)
* Added raw block * Added tests * Added docs * Moved render to __str__ in doc
- Loading branch information
Showing
2 changed files
with
65 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from snakemd import Raw | ||
|
||
|
||
def test_raw_empty(): | ||
raw = Raw("") | ||
assert str(raw) == "" | ||
|
||
def test_raw_one_line(): | ||
raw = Raw("Hello, World!") | ||
assert str(raw) == "Hello, World!" | ||
|
||
def test_raw_two_lines(): | ||
raw = Raw("Hello,\nWorld!") | ||
assert str(raw) == "Hello,\nWorld!" | ||
|
||
def test_raw_user_example(): | ||
raw = Raw("Title: My super title\nDate: 2010-12-03 10:20") | ||
assert str(raw) == "Title: My super title\nDate: 2010-12-03 10:20" |