Class Texy::DomLine
In: lib/texy/dom.rb
Parent: TextualElement

Texy! DOM for single line

Methods

parse   to_html  

Included Modules

DomEasyAccess

Public Instance methods

Convert Texy! single line into DOM structure

[Source]

# File lib/texy/dom.rb, line 406
        def parse(text)
            # Remove special chars and line endings.
            text = Texy.wash(text)
            text = text.gsub("\n", ' ').gsub("\r", '').rstrip

            # Process.
            super
        end

Convert DOM structure to (X)HTML code

[Source]

# File lib/texy/dom.rb, line 418
        def to_html
            html = super
            html = WellForm.new.process(html)
            html = Texy.unfreeze_spaces(html)
            html = Html.check_entities(html)

            html
        end

[Validate]