aboutsummaryrefslogtreecommitdiffstats
path: root/tests/misc_soft_break.rs
blob: 3d0046497a801742e45c30eb3694665c91ad2a63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate markdown;
use markdown::to_html;
use pretty_assertions::assert_eq;

#[test]
fn soft_break() {
    assert_eq!(
        to_html("foo\nbaz"),
        "<p>foo\nbaz</p>",
        "should support line endings"
    );

    assert_eq!(
        to_html("foo \n baz"),
        "<p>foo\nbaz</p>",
        "should trim spaces around line endings"
    );
}