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

[Haml] Fix a bug with new attribute parsing.

Closes gh-18
This commit is contained in:
Nathan Weizenbaum 2009-07-12 10:36:47 -04:00
parent 8d3f1403f3
commit 84670b259a
2 changed files with 5 additions and 1 deletions

View file

@ -617,7 +617,7 @@ END
return name, [:dynamic, var] return name, [:dynamic, var]
end end
re = /((?:\\.|\#[^{]|[^#{quote}\\#])*)(#{quote}|#\{)/ re = /((?:\\.|\#[^{]|[^#{quote}\\#])*#?)(#{quote}|#\{)/
content = [] content = []
loop do loop do
return false unless scanner.scan(re) return false unless scanner.scan(re)

View file

@ -421,6 +421,10 @@ HAML
HAML HAML
end end
def test_new_attrs_with_hash
assert_equal("<a href='#'></a>\n", render('%a(href="#")'))
end
# HTML escaping tests # HTML escaping tests
def test_ampersand_equals_should_escape def test_ampersand_equals_should_escape