Class: Arrow::HTMLText
- Defined in:
- lib/arrow/htmltokenizer.rb
Overview
Class for tokens output by Arrow::HTMLTokenizer for the text bits of an HTML document.
Instance Attribute Summary
Attributes inherited from HTMLToken
Instance Method Summary collapse
-
#to_html ⇒ Object
Return an HTML fragment that can be used to represent the token symbolically in a web-based introspection interface.
Methods inherited from HTMLToken
#css_class, #escape_html, #initialize
Methods inherited from Object
deprecate_class_method, deprecate_method, inherited
Constructor Details
This class inherits a constructor from Arrow::HTMLToken
Instance Method Details
#to_html ⇒ Object
Return an HTML fragment that can be used to represent the token symbolically in a web-based introspection interface.
167 168 169 170 171 172 173 |
# File 'lib/arrow/htmltokenizer.rb', line 167 def to_html marked = self.escape_html( @raw ) marked.gsub( /(&[^;]+;)/ ) {|ent| %Q{<span class="entity">#{ent}</span>} } super { marked } end |