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