Fixed: Links to other wiki pages in headings get corrupted (class attributes shown).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@769 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
20aff7cc70
commit
e1bb4a5baa
|
@ -47,7 +47,7 @@ module Redmine
|
||||||
if tag =~ /^h(\d)$/
|
if tag =~ /^h(\d)$/
|
||||||
@toc << [$1.to_i, content]
|
@toc << [$1.to_i, content]
|
||||||
end
|
end
|
||||||
content = "<a name=\"#{@toc.length}-#{content}\" class=\"wiki-page\"></a>" + content
|
content = "<a name=\"#{@toc.length}\" class=\"wiki-page\"></a>" + content
|
||||||
textile_p(tag, atts, cite, content)
|
textile_p(tag, atts, cite, content)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -61,7 +61,9 @@ module Redmine
|
||||||
div_class << ' right' if $1 == '>'
|
div_class << ' right' if $1 == '>'
|
||||||
out = "<div class=\"#{div_class}\">"
|
out = "<div class=\"#{div_class}\">"
|
||||||
@toc.each_with_index do |heading, index|
|
@toc.each_with_index do |heading, index|
|
||||||
out << "<a href=\"##{index+1}-#{heading.last}\" class=\"heading#{heading.first}\">#{heading.last}</a>"
|
# remove wiki links from the item
|
||||||
|
toc_item = heading.last.gsub(/(\[\[|\]\])/, '')
|
||||||
|
out << "<a href=\"##{index+1}\" class=\"heading#{heading.first}\">#{toc_item}</a>"
|
||||||
end
|
end
|
||||||
out << '</div>'
|
out << '</div>'
|
||||||
out
|
out
|
||||||
|
|
Loading…
Reference in New Issue