@@ -47,7 +47,7 module Redmine | |||
|
47 | 47 | if tag =~ /^h(\d)$/ |
|
48 | 48 | @toc << [$1.to_i, content] |
|
49 | 49 | end |
|
50 |
content = "<a name=\"#{@toc.length} |
|
|
50 | content = "<a name=\"#{@toc.length}\" class=\"wiki-page\"></a>" + content | |
|
51 | 51 | textile_p(tag, atts, cite, content) |
|
52 | 52 | end |
|
53 | 53 | |
@@ -61,7 +61,9 module Redmine | |||
|
61 | 61 | div_class << ' right' if $1 == '>' |
|
62 | 62 | out = "<div class=\"#{div_class}\">" |
|
63 | 63 | @toc.each_with_index do |heading, index| |
|
64 | out << "<a href=\"##{index+1}-#{heading.last}\" class=\"heading#{heading.first}\">#{heading.last}</a>" | |
|
64 | # remove wiki links from the item | |
|
65 | toc_item = heading.last.gsub(/(\[\[|\]\])/, '') | |
|
66 | out << "<a href=\"##{index+1}\" class=\"heading#{heading.first}\">#{toc_item}</a>" | |
|
65 | 67 | end |
|
66 | 68 | out << '</div>' |
|
67 | 69 | out |
General Comments 0
You need to be logged in to leave comments.
Login now