Patch #32359 » 0001-eases-the-regexp-used-to-determine-the-start-of-a-co.patch
lib/redmine/wiki_formatting/markdown/formatter.rb | ||
---|---|---|
90 | 90 |
inside_pre = false |
91 | 91 |
@text.split(/(^(?:.+\r?\n\r?(?:\=+|\-+)|#+.+|(?:~~~|```).*)\s*$)/).each do |part| |
92 | 92 |
level = nil |
93 |
if part =~ /\A(~{3,}|`{3,})(\S+)?\s*$/ |
|
93 |
if part =~ /\A(~{3,}|`{3,})(\s*\S+)?\s*$/
|
|
94 | 94 |
if !inside_pre |
95 | 95 |
inside_pre = true |
96 | 96 |
elsif !$2 |
test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb | ||
---|---|---|
142 | 142 | |
143 | 143 |
Morbi facilisis accumsan orci non pharetra. |
144 | 144 | |
145 |
~~~ ruby |
|
146 |
def foo |
|
147 |
end |
|
148 |
~~~ |
|
149 | ||
145 | 150 |
``` |
146 | 151 |
Pre Content: |
147 | 152 |