diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-06-15 12:18:20 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-06-15 13:08:07 +0200 |
commit | 8cfadc5850a1beaca19f872539acda39641b2d16 (patch) | |
tree | dee7115dbb5a926f5eba020ce66f7ed0598166a0 /tests/misc_soft_break.rs | |
parent | 700f1f5bfb48a80e9e4658a1112d5115cc9da8d4 (diff) | |
download | markdown-rs-8cfadc5850a1beaca19f872539acda39641b2d16.tar.gz markdown-rs-8cfadc5850a1beaca19f872539acda39641b2d16.tar.bz2 markdown-rs-8cfadc5850a1beaca19f872539acda39641b2d16.zip |
Add tests for soft breaks
Diffstat (limited to 'tests/misc_soft_break.rs')
-rw-r--r-- | tests/misc_soft_break.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/misc_soft_break.rs b/tests/misc_soft_break.rs new file mode 100644 index 0000000..1704ec2 --- /dev/null +++ b/tests/misc_soft_break.rs @@ -0,0 +1,18 @@ +extern crate micromark; +use micromark::micromark; + +#[test] +fn soft_break() { + assert_eq!( + micromark("foo\nbaz"), + "<p>foo\nbaz</p>", + "should support line endings" + ); + + // To do: trim whitespace. + // assert_eq!( + // micromark("foo \n baz"), + // "<p>foo\nbaz</p>", + // "should trim spaces around line endings" + // ); +} |