Changed wiki parser to wikicloth.
* Temporarly removing of TOC.
This commit is contained in:
parent
55729e20f9
commit
5d9385cde4
39 changed files with 3474 additions and 64 deletions
19
lib/wikilink.rb
Normal file
19
lib/wikilink.rb
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
class Wikilink < WikiCloth::WikiLinkHandler
|
||||
|
||||
def url_for(page)
|
||||
"/wiki/#{page}"
|
||||
end
|
||||
|
||||
def link_attributes_for(page)
|
||||
permalink = Page.permalink(page)
|
||||
if Page.exists?(:permalink => permalink)
|
||||
{ :href => url_for(permalink) }
|
||||
else
|
||||
{ :href => url_for(page), :class => "new_wiki_link"}
|
||||
end
|
||||
end
|
||||
|
||||
def section_link(section)
|
||||
""
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue