class HamlPreserveFilter in Sassy 7
Preserve Filter for {@link http://haml-lang.com/ Haml} class. Does not parse the filtered text and preserves line breaks. @package PHamlP @subpackage Haml.filters
Hierarchy
- class \HamlBaseFilter
- class \HamlPreserveFilter
Expanded class hierarchy of HamlPreserveFilter
File
- phamlp/
haml/ filters/ HamlPreserveFilter.php, line 18
View source
class HamlPreserveFilter extends HamlBaseFilter {
/**
* Run the filter
* @param string text to filter
* @return string filtered text
*/
public function run($text) {
return str_replace("\n", '
', preg_replace(HamlParser::MATCH_INTERPOLATION, '<?php echo \\1; ?>', $text)) . "\n";
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HamlBaseFilter:: |
public | function | * Initialise the filter. | 2 |
HamlPreserveFilter:: |
public | function |
* Run the filter
* Overrides HamlBaseFilter:: |