Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Can't render 'id' & 'class' attr when using interpolation #10

Closed
keedi opened this Issue · 1 comment

2 participants

@keedi

When I tried to render normal attribute except 'id' and 'class', it works well.
Text::Haml can't render 'id' & 'class' attr well if interpolation is used:

- my $prefix = 'test'
%input.span2{ :type => 'text', :idx => '#{$prefix}-username', :name => '#{$prefix}-username' }
%input.span2{ :type => 'text', :id => '#{$prefix}-username', :name => '#{$prefix}-username' }

Above example result:

<input class='span2' type='text' idx='test-username' name='test-username' value='Yongbin Yu' />
<input class='span2' type='text' id='#{test}-username' name='test-username' value='Yongbin Yu' />

Interpolation works well, but still #{ and } is remained.

@vti
Owner

Fixed. Thanks for reporting.

@vti vti closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.