Class: Nokogiri::XML::CDATA
- Inherits:
-
Object
- Object
- Nokogiri::XML::CDATA
- Defined in:
- lib/html2haml/html.rb
Overview
Instance Method Summary collapse
-
#content_without_cdata_tokens ⇒ Object
removes the start and stop markers for cdata.
- #to_haml(tabs, options) ⇒ Object
Instance Method Details
#content_without_cdata_tokens ⇒ Object
removes the start and stop markers for cdata
232 233 234 235 236 |
# File 'lib/html2haml/html.rb', line 232 def content_without_cdata_tokens content. gsub(/^\s*<!\[CDATA\[\n/,""). gsub(/^\s*\]\]>\n/, "") end |
#to_haml(tabs, options) ⇒ Object
225 226 227 228 229 |
# File 'lib/html2haml/html.rb', line 225 def to_haml(tabs, ) content = parse_text_with_interpolation( erb_to_interpolation(self.content, ), tabs + 1) "#{tabulate(tabs)}:cdata\n#{content}" end |