Defect #22323 » 22323-with-test-after-r18381.patch
| lib/redmine/wiki_formatting/markdown/formatter.rb | ||
|---|---|---|
| 125 | 125 |
@@formatter ||= Redcarpet::Markdown.new( |
| 126 | 126 |
Redmine::WikiFormatting::Markdown::HTML.new( |
| 127 | 127 |
:filter_html => true, |
| 128 |
:hard_wrap => true
|
|
| 128 |
:hard_wrap => false
|
|
| 129 | 129 |
), |
| 130 | 130 |
:autolink => true, |
| 131 | 131 |
:fenced_code_blocks => true, |
| test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb | ||
|---|---|---|
| 173 | 173 |
assert_equal '<p>This <u>text</u> should be underlined</p>', @formatter.new(text).to_html.strip |
| 174 | 174 |
end |
| 175 | 175 | |
| 176 |
def test_no_hard_wrap |
|
| 177 |
text = <<-STR |
|
| 178 |
Para 1 line one |
|
| 179 |
still line one. |
|
| 180 | ||
| 181 |
Para 2 line 1 with 2 spaces#{" "}
|
|
| 182 |
line 2. |
|
| 183 |
STR |
|
| 184 | ||
| 185 |
expected = <<-EXPECTED |
|
| 186 |
<p>Para 1 line one |
|
| 187 |
still line one.</p> |
|
| 188 | ||
| 189 |
<p>Para 2 line 1 with 2 spaces<br> |
|
| 190 |
line 2.</p> |
|
| 191 |
EXPECTED |
|
| 192 | ||
| 193 |
assert_equal expected, @formatter.new(text).to_html |
|
| 194 |
end |
|
| 195 | ||
| 176 | 196 |
private |
| 177 | 197 | |
| 178 | 198 |
def assert_section_with_hash(expected, text, index) |
- « Previous
- 1
- 2
- Next »