vti/text-haml — Issue #5: filters do not process code
Author: rwstauner
Created: 2011-11-29 00:18:01+00:00
State: open

The ruby haml version processes code inside of filters:

```
*$ ruby -rubygems -rhaml -e 'print Haml::Engine.new(":javascript\n alert(\#{ 1 + 1})").render'

```

the perl version does not:

```
$ perl -MText::Haml -e 'print Text::Haml->new->render(":javascript\n alert(#{ 1 + 1 })\n")'

```

I don't think the docs state this limitation.

I tried altering the filter code around line 780:

```
else {
- $el->{text} = $filter->($el->{text});
-
- my $text = $self->_parse_text($el->{text});
+ my $text = $filter->( $self->_parse_text($el->{text}) );
$text =~ s/\\\n/\\n/g;
$output = qq/"/ . $text . qq/\n";/;
```

That fixed this `:javascript` issue, but then broke the custom `:compress` filter test.

I don't know enough about the module as a whole to figure anything out efficiently.