mirror of
https://github.com/redmine/redmine.git
synced 2026-02-20 05:27:43 +01:00
Fixes Wiki "Edit this section" does not extract SeText headings correctly in CommonMark Markdown (#40918).
git-svn-id: https://svn.redmine.org/redmine/trunk@24434 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -42,7 +42,7 @@ module Redmine
|
||||
i = 0
|
||||
l = 1
|
||||
inside_pre = false
|
||||
@text.split(/(^(?:\S+\r?\n\r?(?:=+|-+)|#+ .+|(?:~~~|```).*)\s*$)/).each do |part|
|
||||
@text.split(/(^(?:(?!\s*$|#).+\r?\n\r?(?:=+|-+)|#+ .+|(?:~~~|```).*)\s*$)/).each do |part|
|
||||
level = nil
|
||||
if part =~ /\A(~{3,}|`{3,})(\s*\S+)?\s*$/
|
||||
if !inside_pre
|
||||
|
||||
Reference in New Issue
Block a user