mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Merge branch 'stable'
Conflicts: doc-src/HAML_CHANGELOG.md
This commit is contained in:
commit
b5137bceb4
3 changed files with 38 additions and 2 deletions
|
@ -17,6 +17,17 @@ in the generated class and id.
|
|||
The Haml executable now has a `--double-quote-attributes` option (short form: `-q`)
|
||||
that causes attributes to use a double-quote mark rather than single-quote.
|
||||
|
||||
## 2.2.4
|
||||
|
||||
Allow `end` to be used for silent script when it's followed by code.
|
||||
For example:
|
||||
|
||||
- form_for do
|
||||
...
|
||||
- end if @show_form
|
||||
|
||||
This isn't very good style, but we're supporting it for consistency's sake.
|
||||
|
||||
## [2.2.3](http://github.com/nex3/haml/commit/2.2.3)
|
||||
|
||||
Haml 2.2.3 adds support for the JRuby bundling tools
|
||||
|
|
|
@ -398,8 +398,8 @@ END
|
|||
end
|
||||
|
||||
# Closes a Ruby block.
|
||||
def close_script
|
||||
push_silent "end", true
|
||||
def close_script(push_end = true)
|
||||
push_silent("end", true) if push_end
|
||||
@template_tabs -= 1
|
||||
end
|
||||
|
||||
|
|
|
@ -323,6 +323,31 @@ HTML
|
|||
HAML
|
||||
end
|
||||
|
||||
def test_silent_end_with_stuff
|
||||
assert_equal(<<HTML, render(<<HAML))
|
||||
e
|
||||
d
|
||||
c
|
||||
b
|
||||
a
|
||||
HTML
|
||||
- str = "abcde"
|
||||
- if true
|
||||
= str.slice!(-1).chr
|
||||
- end until str.empty?
|
||||
HAML
|
||||
|
||||
assert_equal(<<HTML, render(<<HAML))
|
||||
<p>hi!</p>
|
||||
HTML
|
||||
- if true
|
||||
%p hi!
|
||||
- end if "foo".gsub(/f/) do
|
||||
- "z"
|
||||
- end + "bar"
|
||||
HAML
|
||||
end
|
||||
|
||||
def test_multiline_with_colon_after_filter
|
||||
assert_equal(<<HTML, render(<<HAML))
|
||||
Foo
|
||||
|
|
Loading…
Add table
Reference in a new issue