[Haml] Fix a bug with new attribute parsing.
Closes gh-18
This commit is contained in:
parent
8d3f1403f3
commit
84670b259a
|
@ -617,7 +617,7 @@ END
|
|||
return name, [:dynamic, var]
|
||||
end
|
||||
|
||||
re = /((?:\\.|\#[^{]|[^#{quote}\\#])*)(#{quote}|#\{)/
|
||||
re = /((?:\\.|\#[^{]|[^#{quote}\\#])*#?)(#{quote}|#\{)/
|
||||
content = []
|
||||
loop do
|
||||
return false unless scanner.scan(re)
|
||||
|
|
|
@ -421,6 +421,10 @@ HAML
|
|||
HAML
|
||||
end
|
||||
|
||||
def test_new_attrs_with_hash
|
||||
assert_equal("<a href='#'></a>\n", render('%a(href="#")'))
|
||||
end
|
||||
|
||||
# HTML escaping tests
|
||||
|
||||
def test_ampersand_equals_should_escape
|
||||
|
|
Loading…
Reference in New Issue