22323-with-test.patch

Martin Cizek, 2019-08-20 16:28

Download (1.47 KB)

View differences:

lib/redmine/wiki_formatting/markdown/formatter.rb
123 123
          @@formatter ||= Redcarpet::Markdown.new(
124 124
            Redmine::WikiFormatting::Markdown::HTML.new(
125 125
              :filter_html => true,
126
              :hard_wrap => true
126
              :hard_wrap => false
127 127
            ),
128 128
            :autolink => true,
129 129
            :fenced_code_blocks => true,
test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb
181 181
    text = 'This _text_ should be underlined'
182 182
    assert_equal '<p>This <u>text</u> should be underlined</p>', @formatter.new(text).to_html.strip
183 183
  end
184

  
185
  def test_no_hard_wrap
186
    text = <<-STR
187
Para 1 line one
188
still line one.
189

  
190
Para 2 line 1 with 2 spaces#{"  "}
191
line 2.
192
STR
193

  
194
    expected = <<-EXPECTED
195
<p>Para 1 line one
196
still line one.</p>
197

  
198
<p>Para 2 line 1 with 2 spaces<br>
199
line 2.</p>
200
EXPECTED
201

  
202
    assert_equal expected, @formatter.new(text).to_html
203
  end
184 204
  end
185 205
end