FrontPage  Index  Search  Changes  Login

Hiki Issue Tracking System - Ticket-145 Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

! HTMLエラー修正

:Priority:Normal
:Reporter:
:Status:New
:Assigned to:?
:Version:0.8.8.1
:Milestone:?
:Created:2010-05-03

!! Description

!tocプラグインの箇条書き
style/default/html_formatter.rbの44行目〜66行目を

     def toc
       s = "<ul>\n"
       num = -1
       level = 1
       to_s unless @html_converted
       @html_converted.each_line do |line|
         if HEADING_RE =~ line
           new_level = $1.to_i - 1
           num += 1
           title = $2.gsub( TAG_RE, '' ).strip
           if new_level > level
             s << ( "<ul>\n" * ( new_level - level ) )
             level = new_level
           elsif new_level < level
             s << ( "</ul>\n" * ( level - new_level ) )
             level = new_level
           end
           s << %Q!<li><a href="\#l#{num}">#{title}</a></li>\n!
         end
       end
       s << ("</ul>\n" * level)
       s
     end

次のように修正。

    def toc
      s = "\n<ul>\n"
      num = -1
      level = 1
      to_s unless @html_converted
      @html_converted.each_line do |line|
        if HEADING_RE =~ line
          new_level = $1.to_i - 1
          num += 1
          title = $2.gsub( TAG_RE, '' ).strip
  if new_level > level
            s << ( "\n<ul>\n" * ( new_level - level ) )
          elsif new_level < level
            s << ("</li>\n</ul>" * ( level - new_level ) +"</li>\n")
          end
                if (num > 0)
                    if new_level == level
                        s << ("</li>\n")
                    end
                end
            level = new_level
          s << %Q!<li><a href="\#l#{num}">#{title}</a>!
        end
      end
      s << ("</li>\n</ul>\n" * level)
      s
    end

!recentプラグイン
plugin/00default.rbの95行目を次のように修正。

*''<h5>''→''<p><strong>''
*''</h5>''→''</strong></p>''

----
!! Changelog
{{its_edit_ticket_form}}