Class

SM::ToHtml

Inheritance
< Object

Constants

Name   Description
InlineTag = Struct.new(:bit, :on, :off)
LIST_TYPE_TO_HTML = { ListBase::BULLET => [ "<ul>", "</ul>" ], ListBase::NUMBER => [ "<ol>", "</ol>" ], ListBase::UPPERALPHA => [ "<ol>", "</ol>" ], ListBase::LOWERALPHA => [ "<ol>", "</ol>" ], ListBase::LABELED => [ "<dl>", "</dl>" ], ListBase::NOTE => [ "<table>", "</table>" ], }

Methods

Class

Visibility Signature
public new ()

Instance

Visibility Signature
public accept_blank_line (am, fragment)
public accept_heading (am, fragment)
public accept_list_end (am, fragment)
public accept_list_item (am, fragment)
public accept_list_start (am, fragment)
public accept_paragraph (am, fragment)
public accept_rule (am, fragment)
public accept_verbatim (am, fragment)
public add_tag (name, start, stop)
public annotate (tag)
public end_accepting ()
public init_tags ()
public start_accepting ()
public wrap (txt, line_len = 76)

Class Method Detail

new()

Instance Method Detail

accept_blank_line(am, fragment)

accept_heading(am, fragment)

accept_list_end(am, fragment)

accept_list_item(am, fragment)

accept_list_start(am, fragment)

accept_paragraph(am, fragment)

accept_rule(am, fragment)

accept_verbatim(am, fragment)

add_tag(name, start, stop)

Add a new set of HTML tags for an attribute. We allow separate start and end tags for flexibility

annotate(tag)

Given an HTML tag, decorate it with class information and the like if required. This is a no-op in the base class, but is overridden in HTML output classes that implement style sheets

end_accepting()

init_tags()

Set up the standard mapping of attributes to HTML tags

start_accepting()

Here‘s the client side of the visitor pattern

wrap(txt, line_len = 76)

This is a higher speed (if messier) version of wrap