diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-06 17:21:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-06 17:21:09 +0000 |
commit | 8cc56cce6683c52c3faea6ce90abd907e117152c (patch) | |
tree | 4fe64c784acb751825705e26df86eec966711525 | |
parent | 8d5fadc7732ef0ca9f32472f02401920d65c9977 (diff) | |
download | redmine-8cc56cce6683c52c3faea6ce90abd907e117152c.tar.gz redmine-8cc56cce6683c52c3faea6ce90abd907e117152c.zip |
Merged r10294 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@10297 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/helpers/application_helper.rb | 4 | ||||
-rw-r--r-- | doc/CHANGELOG | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0e12d51ee..2ab208b15 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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 diff --git a/doc/CHANGELOG b/doc/CHANGELOG index cd8b2703f..ba956b8ba 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -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 |