File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def text hard_break = ''
2121 else
2222 part
2323 end
24- end . join . gsub ( / \r ? \n / , ' ' )
24+ end . join
2525 end
2626
2727end
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ def accept_block_quote block_quote
176176 def accept_paragraph paragraph
177177 @res << "\n <p>"
178178 text = paragraph . text @hard_break
179+ text = text . gsub ( /\r ?\n / , ' ' )
179180 @res << wrap ( to_html ( text ) )
180181 @res << "</p>\n "
181182 end
Original file line number Diff line number Diff line change @@ -389,6 +389,14 @@ def test_accept_heading_pipe
389389 assert_equal "\n <h1 id=\" label-Hello\" >Hello</h1>\n " , @to . res . join
390390 end
391391
392+ def test_accept_paragraph_newline
393+ @to . start_accepting
394+
395+ @to . accept_paragraph para ( "hello\n " , "world\n " )
396+
397+ assert_equal "\n <p>hello world</p>\n " , @to . res . join
398+ end
399+
392400 def test_accept_verbatim_parseable
393401 verb = @RM ::Verbatim . new ( "class C\n " , "end\n " )
394402
You can’t perform that action at this time.
0 commit comments