# Class: Haml::Filters::Preserve

Inherits:
  Base
  - Object
  - Base
  - Haml::Filters::Preserve
  show all

Defined in:
  lib/haml/filters/preserve.rb

## Instance Method Summary collapse

- #compile(node)

### Methods inherited from Base

#initialize

## Constructor Details

This class inherits a constructor from Haml::Filters::Base

## Instance Method Details

### #compile(node)

    5
    6
    7
    8
    9

    # File 'lib/haml/filters/preserve.rb', line 5

    def compile(node)
      text = node.value[:text].rstrip + "\n"
      text = text.gsub("\n", '&#x000A;')
      compile_text(text)
    end