I found an intresting thing, when I want to insert a plain ruby code
in my text. Syntax was ok, but render failed. I made a little test.
Here it is:

test.haml:
%pre
  :plain
     "#{line}"

haml -c test.haml => Syntax Ok
ham test.haml =>
Exception on line 3: undefined local variable or method `line' for
#<Object:0x105a93c>
  Use --trace for backtrace.

With --trace
ham test.haml =>
Exception on line 3: undefined local variable or method `line' for
#<Object:0x105a93c>
 /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.3/bin/../lib/haml/
engine.rb:149:in `to_html'
  /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.3/bin/../lib/haml/
engine.rb:149:in `instance_eval'
  /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.3/bin/../lib/haml/
engine.rb:149:in `to_html'
  /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.3/bin/../lib/haml/exec.rb:
261:in `process_result'
  /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.3/bin/../lib/haml/exec.rb:
23:in `parse!'
  /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.3/bin/haml:9
  /usr/local/bin/haml:19:in `load'
  /usr/local/bin/haml:19

However if I write:
%pre
  :plain
     "\#{line}"

Then render is works fine.

So I think this is a bug, because :plain filter should be ignore to
parse the ruby code.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to