diff options
author | Go MAEDA <maeda@farend.jp> | 2019-10-29 21:54:04 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-10-29 21:54:04 +0000 |
commit | 19990751a542a68aa183730ae63cc9495958eb86 (patch) | |
tree | 89d5f8482ebf77f883ae004367347af5257b6622 /lib | |
parent | fbaaa412ea77aab4efc7585f1973c6872971ee8a (diff) | |
download | redmine-19990751a542a68aa183730ae63cc9495958eb86.tar.gz redmine-19990751a542a68aa183730ae63cc9495958eb86.zip |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/wiki_formatting/markdown/formatter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/markdown/formatter.rb b/lib/redmine/wiki_formatting/markdown/formatter.rb index 9082c3658..f4dd56452 100644 --- a/lib/redmine/wiki_formatting/markdown/formatter.rb +++ b/lib/redmine/wiki_formatting/markdown/formatter.rb @@ -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 |