mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Merge commit 'origin/stable' into stable
This commit is contained in:
commit
91591b19a6
3 changed files with 38 additions and 2 deletions
|
@ -3,6 +3,17 @@
|
|||
* Table of contents
|
||||
{:toc}
|
||||
|
||||
## 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
|
||||
|
||||
|
|
|
@ -318,6 +318,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…
Reference in a new issue