##// END OF EJS Templates
Merged r10294 from trunk....
Jean-Philippe Lang -
r10114:8cc56cce6683
parent child
Show More
@@ -799,7 +799,7 module ApplicationHelper
799 end
799 end
800 end
800 end
801
801
802 HEADING_RE = /(<h(1|2|3|4)( [^>]+)?>(.+?)<\/h(1|2|3|4)>)/i unless const_defined?(:HEADING_RE)
802 HEADING_RE = /(<h(\d)( [^>]+)?>(.+?)<\/h(\d)>)/i unless const_defined?(:HEADING_RE)
803
803
804 def parse_sections(text, project, obj, attr, only_path, options)
804 def parse_sections(text, project, obj, attr, only_path, options)
805 return unless options[:edit_section_links]
805 return unless options[:edit_section_links]
@@ -870,6 +870,8 module ApplicationHelper
870 # Renders the TOC with given headings
870 # Renders the TOC with given headings
871 def replace_toc(text, headings)
871 def replace_toc(text, headings)
872 text.gsub!(TOC_RE) do
872 text.gsub!(TOC_RE) do
873 # Keep only the 4 first levels
874 headings = headings.select{|level, anchor, item| level <= 4}
873 if headings.empty?
875 if headings.empty?
874 ''
876 ''
875 else
877 else
@@ -11,6 +11,7 http://www.redmine.org/
11 * Defect #11307: Can't filter for negative numeric custom fields
11 * Defect #11307: Can't filter for negative numeric custom fields
12 * Defect #11365: Attachment description length is not validated
12 * Defect #11365: Attachment description length is not validated
13 * Defect #11541: Version sharing is missing in the REST API
13 * Defect #11541: Version sharing is missing in the REST API
14 * Defect #11789: Edit section links broken with h5/h6 headings
14 * Feature #11338: Exclude emails with auto-submitted => auto-generated
15 * Feature #11338: Exclude emails with auto-submitted => auto-generated
15 * Patch #11328: Fix Japanese mistranslation for 'label_language_based'
16 * Patch #11328: Fix Japanese mistranslation for 'label_language_based'
16 * Patch #11448: Russian translation for 1.4-stable and 2.0-stable
17 * Patch #11448: Russian translation for 1.4-stable and 2.0-stable
General Comments 0
You need to be logged in to leave comments. Login now