13
13
###### 6
14
14
MD
15
15
16
- expect ( output ) . to be ==
17
- "<h1>1</h1><h2>2</h2><h3>3</h3><h4>4</h4><h5>5</h5><h6>6</h6>"
16
+ expect ( output . strip ) . to be ==
17
+ "<h1>1</h1> <h2>2</h2> <h3>3</h3> <h4>4</h4> <h5>5</h5> <h6>6</h6>"
18
18
end
19
19
20
20
it "supports ordered lists" do
25
25
MD
26
26
27
27
expect ( output ) . to be ==
28
- "<ol><li>One</li><li>Two</li><li>Three</li></ol>"
28
+ "<ol><li>One</li> <li>Two</li> <li>Three</li> </ol>"
29
29
end
30
30
31
31
it "supports unordered lists" do
36
36
MD
37
37
38
38
expect ( output ) . to be ==
39
- "<ul><li>One</li><li>Two</li><li>Three</li></ul>"
39
+ "<ul><li>One</li> <li>Two</li> <li>Three</li> </ul>"
40
40
end
41
41
42
42
it "supports inline code" do
43
43
output = md "Some `code` here"
44
- expect ( output ) . to be == "<p>Some <code>code</code> here</p>"
44
+ expect ( output . strip ) . to be == "<p>Some <code>code</code> here</p>"
45
45
end
46
46
47
47
it "supports block code" do
@@ -59,27 +59,27 @@ def foo
59
59
60
60
it "supports paragraphs" do
61
61
output = md "A\n \n B"
62
- expect ( output ) . to be == "<p>A</p><p>B</p>"
62
+ expect ( output . strip ) . to be == "<p>A</p> <p>B</p>"
63
63
end
64
64
65
65
it "supports links" do
66
66
output = md "[Hello](world 'title')"
67
- expect ( output ) . to be == %(<p><a href="world" title="title">Hello</a></p>)
67
+ expect ( output . strip ) . to be == %(<p><a href="world" title="title">Hello</a></p>)
68
68
end
69
69
70
70
it "supports emphasis" do
71
71
output = md "*Hello*"
72
- expect ( output ) . to be == "<p><em>Hello</em></p>"
72
+ expect ( output . strip ) . to be == "<p><em>Hello</em></p>"
73
73
end
74
74
75
75
it "supports strong" do
76
76
output = md "**Hello**"
77
- expect ( output ) . to be == "<p><strong>Hello</strong></p>"
77
+ expect ( output . strip ) . to be == "<p><strong>Hello</strong></p>"
78
78
end
79
79
80
80
it "supports blockquotes" do
81
81
output = md "> Hello"
82
- expect ( output ) . to be == "<blockquote><p>Hello</p></blockquote>"
82
+ expect ( output ) . to be == "<blockquote><p>Hello</p> </blockquote>"
83
83
end
84
84
85
85
it "supports horizontal rules" do
@@ -89,7 +89,7 @@ def foo
89
89
90
90
it "supports images" do
91
91
output = md ""
92
- expect ( output ) . to be == %(<p><img src="src" alt="alt" title="title"></p>)
92
+ expect ( output . strip ) . to be == %(<p><img src="src" alt="alt" title="title"></p>)
93
93
end
94
94
95
95
it "supports softbreaks in content as spaces" do
@@ -100,7 +100,7 @@ def foo
100
100
Three
101
101
MD
102
102
103
- expect ( output ) . to be == "<p>One Two</p><p>Three</p>"
103
+ expect ( output . strip ) . to be == "<p>One Two</p> <p>Three</p>"
104
104
end
105
105
106
106
xit "supports blockquote [!NOTE]" do
@@ -109,7 +109,7 @@ def foo
109
109
> Hello!
110
110
MD
111
111
112
- expect ( output ) . to match %r{<blockquote><svg .*><p>Hello!</p></blockquote>}
112
+ expect ( output . strip ) . to match %r{<blockquote><svg .*><p>Hello!</p> </blockquote>}
113
113
end
114
114
115
115
def md ( content )
0 commit comments