Class String
In: lib/gerbil/html.rb
Parent: Object

Methods

Constants

PROTECTED_TAGS = %w[tt code pre]   The content of these HTML tags will be preserved while they are being processed by Textile. By doing this, we avoid unwanted Textile transformations, such as quotation marks becoming curly (&8192;), in source code.
VERBATIM_TAGS = %w[noformat]   The content of these HTML tags will be preserved verbatim throughout the text-to-HTML conversion process.

Public Instance methods

Adds syntax coloring to <code> elements in the given text. If the <code> tag has an attribute lang="…", then that is considered the programming language for which appropriate syntax coloring should be applied. Otherwise, the programming language is assumed to be ruby.

Returns the result of running this string through RedCloth.

Transforms this string into HTML.

[Validate]