Module: Creole
- Defined in:
- lib/creole/parser.rb,
lib/creole.rb,
lib/creole/version.rb
Overview
Main Creole parser class. Call CreoleParser#parse to parse Creole 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
Defined Under Namespace
Classes: Parser
Constant Summary collapse
- VERSION =
'0.5.0'
Class Method Summary collapse
-
.creolize(text, options = {}) ⇒ Object
Convert the argument in Creole format to HTML and return the result.
Class Method Details
.creolize(text, options = {}) ⇒ Object
Convert the argument in Creole format to HTML and return the result. Example:
Creole.creolize("**Hello //World//**")
#=> "<p><strong>Hello <em>World</em></strong></p>"
This is an alias for calling Creole#parse:
Creole.new(text).to_html
13 14 15 |
# File 'lib/creole.rb', line 13 def self.creolize(text, = {}) Parser.new(text, ).to_html end |