]> source.dussan.org Git - redmine.git/commitdiff
Don't use implicit variables later (#21593).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 30 Jan 2016 15:42:48 +0000 (15:42 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 30 Jan 2016 15:42:48 +0000 (15:42 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15137 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb

index 483f88704d5e3b7a1b12e034001b15e959173e5f..ff2006437dc6f3d173282129b0fb88d2f13df52e 100644 (file)
@@ -883,13 +883,13 @@ module ApplicationHelper
   def parse_sections(text, project, obj, attr, only_path, options)
     return unless options[:edit_section_links]
     text.gsub!(HEADING_RE) do
-      heading = $1
+      heading, level = $1, $2
       @current_section += 1
       if @current_section > 1
         content_tag('div',
           link_to('', options[:edit_section_links].merge(:section => @current_section),
                   :class => 'icon-only icon-edit'),
-          :class => "contextual heading-#{$2}",
+          :class => "contextual heading-#{level}",
           :title => l(:button_edit_section),
           :id => "section-#{@current_section}") + heading.html_safe
       else