public
Rubygem
Fork of nex3/haml
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/chriseppstein/haml.git
99.1% RCov, and most of the rest not really untested anyway. Woo. 


git-svn-id: svn://hamptoncatlin.com/haml/trunk@536 
7063305b-7217-0410-af8c-cdc13e5119b9
nex3 (author)
Fri Jun 22 13:45:21 -0700 2007
commit  ef44c42b82fb5f541b0b1e009517e6096eefd643
tree    3f8f16682c110daf24361658fcd4fe805d7e4dc3
parent  392a69fab722a88c6f5b48780abb7c923b8d3090
...
80
81
82
83
 
84
85
86
...
94
95
96
97
98
99
100
101
...
80
81
82
 
83
84
85
86
...
94
95
96
 
 
97
98
99
0
@@ -80,7 +80,7 @@ module Haml
0
 
0
     # Takes the various information about the opening tag for an
0
     # element, formats it, and adds it to the buffer.
0
- def open_tag(name, tabulation, atomic, try_one_line, class_id, obj_ref, flattened, attributes_hash)
0
+ def open_tag(name, tabulation, atomic, try_one_line, class_id, obj_ref, attributes_hash)
0
       attributes = class_id
0
       if attributes_hash
0
         attributes_hash.keys.each { |key| attributes_hash[key.to_s] = attributes_hash.delete(key) }
0
@@ -94,8 +94,6 @@ module Haml
0
       elsif try_one_line
0
         @one_liner_pending = true
0
         str = ">"
0
- elsif flattened
0
- str = ">
"
0
       else
0
         str = ">\n"
0
       end
...
654
655
656
 
 
 
 
657
658
659
...
741
742
743
744
 
745
746
747
...
654
655
656
657
658
659
660
661
662
663
...
745
746
747
 
748
749
750
751
0
@@ -654,6 +654,10 @@ END
0
           attr_wrapper = @options[:attr_wrapper]
0
           if v.include? attr_wrapper
0
             if v.include? @other_quote_char
0
+ # An imperfection in LITERAL_VALUE_REGEX prevents this
0
+ # from ever actually being reached,
0
+ # but in case it becomes possible,
0
+ # I'm leaving it in.
0
               v = v.gsub(attr_wrapper, @quote_escape)
0
             else
0
               attr_wrapper = @other_quote_char
0
@@ -741,7 +745,7 @@ END
0
           push_silent "_hamlout.open_prerendered_tag(#{open_tag.dump}, #{@output_tabs})"
0
           return if do_one_liner
0
         else
0
- push_silent "_hamlout.open_tag(#{tag_name.inspect}, #{@output_tabs}, #{atomic.inspect}, #{value_exists.inspect}, #{attributes.inspect}, #{object_ref}, #{flattened.inspect}, #{attributes_hash[1...-1]})", true
0
+ push_silent "_hamlout.open_tag(#{tag_name.inspect}, #{@output_tabs}, #{atomic.inspect}, #{value_exists.inspect}, #{attributes.inspect}, #{object_ref}, #{attributes_hash[1...-1]})", true
0
         end
0
           
0
         unless atomic
...
55
56
57
 
 
 
...
55
56
57
58
59
60
0
@@ -55,3 +55,6 @@ testtest
0
 <p class='article foo' id='article_1'>Blah</p>
0
 <p class='article quux qux' id='article_1'>Blump</p>
0
 Woah inner quotes
0
+<p class='dynamic_quote' dyn='3' quotes="single '">
0
+</p>
0
+<p class='dynamic_atomic' dyn='3' />
...
62
63
64
 
 
...
62
63
64
65
66
0
@@ -62,3 +62,5 @@
0
 %p.foo{:class => false ? 'bar' : ''}[@article] Blah
0
 %p.qux{:class => 'quux'}[@article] Blump
0
 == #{"Woah inner quotes"}
0
+%p.dynamic_quote{:quotes => "single '", :dyn => 1 + 2}
0
+%p.dynamic_atomic{:dyn => 1 + 2}/

Comments

    No one has commented yet.