module TracWiki

Main TracWiki parser class. Call TracWikiParser#parse to parse TracWiki formatted text.

This class is not reentrant. A separate instance is needed for each thread that needs to convert Creole to HTML.

Inherit this to provide custom handling of links. The overrideable methods are: make_local_link

Constants

VERSION

Public Class Methods

parser(options = {}) click to toggle source
# File lib/trac-wiki.rb, line 18
def self.parser(options = {})
  Parser.new(options)
end
render(text, options = {}) click to toggle source

Convert the argument in Trac format to HTML and return the result. Example:

TracWiki.render(“**Hello ''World''**”) #=> “<p><strong>Hello World</strong></p>”

This is an alias for calling Creole#parse: TracWiki.new(text).to_html

# File lib/trac-wiki.rb, line 15
def self.render(text, options = {})
  Parser.new(options).to_html(text)
end