File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def to_s
101101
102102 # Output entire document as a String HTML fragment
103103 def to_html
104- paragraphs . map ( &:to_html ) . join ( '\n' )
104+ paragraphs . map ( &:to_html ) . join ( " \n " )
105105 end
106106
107107 # Save document to provided path
Original file line number Diff line number Diff line change 494494 it 'should output styled html' do
495495 expect ( @formatted_line . to_html . scan ( '<span style="text-decoration:underline;"><strong><em>all</em></strong></span>' ) . size ) . to eq 1
496496 end
497+
498+ it 'should join paragraphs with newlines' do
499+ expect ( @doc . to_html . scan ( %(<p style="font-size:11pt;">Normal</p>\n <p style="font-size:11pt;"><em>Italic</em></p>\n <p style="font-size:11pt;"><strong>Bold</strong></p>) ) . size ) . to eq 1
500+ end
497501 end
498502
499503 describe 'replacing contents' do
You can’t perform that action at this time.
0 commit comments