Module: Undress

Defined in:
lib/undress.rb,
lib/undress/grammar.rb,
lib/undress/textile.rb,
lib/undress/greencloth.rb

Defined Under Namespace

Classes: Document, Grammar, GreenCloth, Textile

Constant Summary collapse

INLINE_ELEMENTS =
['span', 'b', 'strong', 'i', 'em', 'ins', 'del','strike', 'abbr', 'acronym', 'cite', 'code', 'label', 'sub', 'sup']
ALLOWED_TAGS =
[
  'div', 'a', 'img', 'br', 'i', 'u', 'b', 'pre', 'kbd', 'code', 'cite', 'strong', 'em',
  'ins', 'sup', 'sub', 'del', 'table', 'tbody', 'thead', 'tr', 'td', 'th', 'ol', 'ul',
  'li', 'p', 'span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'notextile', 'blockquote',
  'object', 'embed', 'param', 'acronym', 'dd', 'dl', 'dt'
]

Class Method Summary collapse

Class Method Details

.add_markup(name, grammar) ⇒ Object

Register a markup language. The name will become the method used to convert HTML to this markup language: for example registering the name :textile gives you Undress(code).to_textile, registering :markdown would give you Undress(code).to_markdown, etc.



21
22
23
# File 'lib/undress.rb', line 21

def self.add_markup(name, grammar)
  Document.add_markup(name, grammar)
end