You are here

public function HamlCssFilter::run in Sassy 7

* Run the filter *

Parameters

string text to filter: * @return string filtered text

Overrides HamlBaseFilter::run

File

phamlp/haml/filters/HamlCssFilter.php, line 25

Class

HamlCssFilter
CSS Filter for {@link http://haml-lang.com/ Haml} class. Surrounds the filtered text with <style> and CDATA tags. Useful for including inline CSS. @package PHamlP @subpackage Haml.filters

Code

public function run($text) {
  return "<style type=\"text/css\">\n/*<![CDATA[*/\n" . preg_replace(HamlParser::MATCH_INTERPOLATION, '<?php echo \\1; ?>', $text) . "/*]]>*/\n</style>\n";
}