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:
parent
64ee5620ec
commit
d5c5516e2e
2 changed files with 9 additions and 0 deletions
|
@ -612,6 +612,10 @@ END
|
|||
atomic = true
|
||||
when '=', '~'
|
||||
parse = true
|
||||
|
||||
if value.first == '='
|
||||
value = value[1..-1].strip.dump.gsub('\\#', '#')
|
||||
end
|
||||
end
|
||||
|
||||
flattened = (action == '~')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue