1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

"==" syntax works for lines with tags (e.g. "%p== Foo #{bar}"). Patch by Thomas Brian - thanks!

git-svn-id: svn://hamptoncatlin.com/haml/trunk@506 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
nex3 2007-05-07 18:16:24 +00:00
parent 64ee5620ec
commit d5c5516e2e
2 changed files with 9 additions and 0 deletions

View file

@ -612,6 +612,10 @@ END
atomic = true
when '=', '~'
parse = true
if value.first == '='
value = value[1..-1].strip.dump.gsub('\\#', '#')
end
end
flattened = (action == '~')

View file

@ -53,6 +53,11 @@ class EngineTest < Test::Unit::TestCase
assert_equal("<strong>Hi there!</strong>\n", engine.to_html)
end
def test_double_equals
assert_equal("<p>Hello World</p>\n", render('%p== Hello #{who}', :locals => {:who => 'World'}))
assert_equal("<p>\n Hello World\n</p>\n", render("%p\n == Hello \#{who}", :locals => {:who => 'World'}))
end
# Options tests
def test_stop_eval