mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-24 01:11:12 +00:00
Eases the regexp used to determine the start of a code block (#32359).
Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@18880 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
fbaaa412ea
commit
19990751a5
@ -90,7 +90,7 @@ module Redmine
|
||||
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
|
||||
|
||||
@ -142,6 +142,11 @@ EXPECTED
|
||||
|
||||
Morbi facilisis accumsan orci non pharetra.
|
||||
|
||||
~~~ ruby
|
||||
def foo
|
||||
end
|
||||
~~~
|
||||
|
||||
```
|
||||
Pre Content:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user