Merged r10294 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@10297 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-09-06 17:21:09 +00:00
parent 8d5fadc773
commit 8cc56cce66
2 changed files with 4 additions and 1 deletions

View File

@@ -799,7 +799,7 @@ module ApplicationHelper
end
end
HEADING_RE = /(<h(1|2|3|4)( [^>]+)?>(.+?)<\/h(1|2|3|4)>)/i unless const_defined?(:HEADING_RE)
HEADING_RE = /(<h(\d)( [^>]+)?>(.+?)<\/h(\d)>)/i unless const_defined?(:HEADING_RE)
def parse_sections(text, project, obj, attr, only_path, options)
return unless options[:edit_section_links]
@@ -870,6 +870,8 @@ module ApplicationHelper
# Renders the TOC with given headings
def replace_toc(text, headings)
text.gsub!(TOC_RE) do
# Keep only the 4 first levels
headings = headings.select{|level, anchor, item| level <= 4}
if headings.empty?
''
else

View File

@@ -11,6 +11,7 @@ http://www.redmine.org/
* Defect #11307: Can't filter for negative numeric custom fields
* Defect #11365: Attachment description length is not validated
* Defect #11541: Version sharing is missing in the REST API
* Defect #11789: Edit section links broken with h5/h6 headings
* Feature #11338: Exclude emails with auto-submitted => auto-generated
* Patch #11328: Fix Japanese mistranslation for 'label_language_based'
* Patch #11448: Russian translation for 1.4-stable and 2.0-stable