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:
parent
8d3f1403f3
commit
84670b259a
2 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue