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:
Go MAEDA
2019-10-29 21:54:04 +00:00
parent fbaaa412ea
commit 19990751a5
2 changed files with 6 additions and 1 deletions

View File

@@ -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