Added toc to wikipages. Patched wikicloth.
* patched wikicloth to serve anchor links for sections * added table of contents * subpages list doesn't show up per default
This commit is contained in:
parent
741815e24e
commit
67661cb716
9 changed files with 72 additions and 40 deletions
2
vendor/plugins/wikicloth/lib/wiki_buffer.rb
vendored
2
vendor/plugins/wikicloth/lib/wiki_buffer.rb
vendored
|
|
@ -127,7 +127,7 @@ class WikiBuffer
|
|||
self.data.gsub!(/^([-]{4,})/) { |r| "<hr />" }
|
||||
self.data.gsub!(/^([=]{1,6})\s*(.*?)\s*(\1)/) { |r|
|
||||
@section_count += 1
|
||||
"<h#{$1.length}>" + (@noeditsection == true ? "" :
|
||||
"<a name='section-#{@section_count}' /><h#{$1.length}>" + (@noeditsection == true ? "" :
|
||||
"<span class=\"editsection\">[<a href=\"" + @options[:link_handler].section_link(@section_count) +
|
||||
"\" title=\"Edit section: #{$2}\">edit</a>]</span>") +
|
||||
" <span class=\"mw-headline\">#{$2}</span></h#{$1.length}>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue