haml-edge 2.3.84 → 2.3.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/haml/precompiler.rb +1 -1
- data/lib/sass/plugin/rails.rb +8 -3
- data/test/haml/engine_test.rb +14 -1
- metadata +2 -2
data/EDGE_GEM_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.3.
|
|
1
|
+
2.3.85
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.3.
|
|
1
|
+
2.3.85
|
data/lib/haml/precompiler.rb
CHANGED
|
@@ -744,7 +744,7 @@ END
|
|
|
744
744
|
raise SyntaxError.new("There's no Ruby code for #{action} to evaluate.", last_line - 1) if parse && value.empty?
|
|
745
745
|
raise SyntaxError.new("Self-closing tags can't have content.", last_line - 1) if self_closing && !value.empty?
|
|
746
746
|
|
|
747
|
-
self_closing ||= !!(
|
|
747
|
+
self_closing ||= !!(!block_opened? && value.empty? && @options[:autoclose].any? {|t| t === tag_name})
|
|
748
748
|
value = nil if value.empty? && (block_opened? || self_closing)
|
|
749
749
|
|
|
750
750
|
dont_indent_next_line =
|
data/lib/sass/plugin/rails.rb
CHANGED
|
@@ -7,9 +7,14 @@ unless defined?(Sass::RAILS_LOADED)
|
|
|
7
7
|
:always_check => RAILS_ENV != "production",
|
|
8
8
|
:full_exception => RAILS_ENV != "production")
|
|
9
9
|
|
|
10
|
-
if defined?(
|
|
11
|
-
# Rails >= 3.0
|
|
12
|
-
|
|
10
|
+
if defined?(Rails.configuration.middleware)
|
|
11
|
+
# Rails >= 3.0
|
|
12
|
+
require 'sass/plugin/rack'
|
|
13
|
+
Rails.configuration.middleware.use(Sass::Plugin::Rack)
|
|
14
|
+
elsif defined?(ActionController::Dispatcher.middleware)
|
|
15
|
+
# Rails >= 2.3
|
|
16
|
+
require 'sass/plugin/rack'
|
|
17
|
+
ActionController::Dispatcher.middleware.use(Sass::Plugin::Rack)
|
|
13
18
|
else
|
|
14
19
|
module ActionController
|
|
15
20
|
class Base
|
data/test/haml/engine_test.rb
CHANGED
|
@@ -764,13 +764,26 @@ HAML
|
|
|
764
764
|
assert_equal("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n", render("!!! XML", :attr_wrapper => '"'))
|
|
765
765
|
end
|
|
766
766
|
|
|
767
|
+
def test_autoclose_option
|
|
768
|
+
assert_equal("<flaz foo='bar' />\n", render("%flaz{:foo => 'bar'}", :autoclose => ["flaz"]))
|
|
769
|
+
assert_equal(<<HTML, render(<<HAML, :autoclose => [/^flaz/]))
|
|
770
|
+
<flaz />
|
|
771
|
+
<flaznicate />
|
|
772
|
+
<flan></flan>
|
|
773
|
+
HTML
|
|
774
|
+
%flaz
|
|
775
|
+
%flaznicate
|
|
776
|
+
%flan
|
|
777
|
+
HAML
|
|
778
|
+
end
|
|
779
|
+
|
|
767
780
|
def test_attrs_parsed_correctly
|
|
768
781
|
assert_equal("<p boom=>biddly='bar => baz'></p>\n", render("%p{'boom=>biddly' => 'bar => baz'}"))
|
|
769
782
|
assert_equal("<p foo,bar='baz, qux'></p>\n", render("%p{'foo,bar' => 'baz, qux'}"))
|
|
770
783
|
assert_equal("<p escaped='quo
te'></p>\n", render("%p{ :escaped => \"quo\\nte\"}"))
|
|
771
784
|
assert_equal("<p escaped='quo4te'></p>\n", render("%p{ :escaped => \"quo\#{2 + 2}te\"}"))
|
|
772
785
|
end
|
|
773
|
-
|
|
786
|
+
|
|
774
787
|
def test_correct_parsing_with_brackets
|
|
775
788
|
assert_equal("<p class='foo'>{tada} foo</p>\n", render("%p{:class => 'foo'} {tada} foo"))
|
|
776
789
|
assert_equal("<p class='foo'>deep {nested { things }}</p>\n", render("%p{:class => 'foo'} deep {nested { things }}"))
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: haml-edge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.85
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Weizenbaum
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2009-11-
|
|
13
|
+
date: 2009-11-14 00:00:00 -05:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|