diff --git a/spec/lib/open_project/text_formatting/markdown/markdown_formatting_spec.rb b/spec/lib/open_project/text_formatting/markdown/markdown_formatting_spec.rb index 3b55a9fe4f..152d33b6f3 100644 --- a/spec/lib/open_project/text_formatting/markdown/markdown_formatting_spec.rb +++ b/spec/lib/open_project/text_formatting/markdown/markdown_formatting_spec.rb @@ -180,65 +180,33 @@ EXPECTED it 'should table' do raw = <<-RAW -This is a table with empty cells: +This is a table with header cells: -|cell11|cell12|| -|cell21||cell23| -|cell31|cell32|cell33| +|header|header| +|------|------| +|cell11|cell12| +|cell21|cell23| +|cell31|cell32| RAW expected = <<-EXPECTED -

This is a table with empty cells:

+

This is a table with header cells:

- - - + + + + + + + +
cell11cell12
cell21cell23
cell31cell32cell33
headerheader
cell11cell12
cell21cell23
cell31cell32
EXPECTED expect(to_html(raw).gsub(%r{\s+}, '')).to eq(expected.gsub(%r{\s+}, '')) end - it 'should table with line breaks' do - raw = <<-RAW -This is a table with line breaks: - -|cell11 -continued|cell12|| -|~cell21~||cell23 -cell23 line2 -cell23 **line3**| -|cell31|cell32 -cell32 line2|cell33| - -RAW - - expected = <<-EXPECTED -

This is a table with line breaks:

- - - - - - - - - - - - - - - - - -
cell11
continued
cell12
cell21cell23
cell23 line2
cell23 line3
cell31cell32
cell32 line2
cell33
-EXPECTED - - expect(expected.gsub(%r{\s+}, '')).to eq(to_html(raw).gsub(%r{\s+}, '')) - end - it 'should not mangle brackets' do expect(to_html('[msg1][msg2]')).to eq '

[msg1][msg2]

' end