mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Merge branch 'master' into 3-2-stable
Conflicts: lib/haml/parser.rb lib/haml/version.rb
This commit is contained in:
commit
dbaff8e03f
5 changed files with 9 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
# Haml (XHTML Abstraction Markup Language)
|
||||
# Haml (HTML Abstraction Markup Language)
|
||||
|
||||
Haml is a markup language that's used to cleanly and simply describe the HTML of
|
||||
any web document, without the use of inline code. Haml functions as a
|
||||
|
|
|
@ -444,7 +444,7 @@ module Haml
|
|||
end
|
||||
|
||||
def close_silent_script(node)
|
||||
@script_level_stack.pop if %w{if unless case}.include? node.value[:keyword]
|
||||
@script_level_stack.pop if ["if", "case", "unless"].include? node.value[:keyword]
|
||||
|
||||
# Post-process case statements to normalize the nesting of "when" clauses
|
||||
return unless node.value[:keyword] == "case"
|
||||
|
|
|
@ -8,7 +8,7 @@ module Haml
|
|||
# the ERB handler does.
|
||||
|
||||
# In Rails 3.1+, we don't need to include Compilable.
|
||||
if ::Rails.version < "3.1"
|
||||
if ActionPack::VERSION::MAJOR < 3 || (ActionPack::VERSION::MAJOR == 3 && ActionPack::VERSION::MINOR < 1)
|
||||
include ActionView::Template::Handlers::Compilable
|
||||
end
|
||||
|
||||
|
|
|
@ -1930,7 +1930,7 @@ HAML
|
|||
- foo.each do | item |
|
||||
= item
|
||||
HAML
|
||||
rescue ::SyntaxError => e
|
||||
rescue ::SyntaxError
|
||||
flunk("Should not have raised syntax error")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
Odd!
|
||||
- else
|
||||
Even!
|
||||
- unless true
|
||||
Testing else indent
|
||||
- case 1
|
||||
- when 2
|
||||
Also testing else indent
|
||||
- else
|
||||
= "This can't happen!"
|
||||
- 13 |
|
||||
|
|
Loading…
Reference in a new issue