public
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/nex3/haml.git
Search Repo:
Applying #36




git-svn-id: svn://hamptoncatlin.com/haml/trunk@60 
7063305b-7217-0410-af8c-cdc13e5119b9
hcatlin (author)
Tue Oct 03 12:48:02 -0700 2006
commit  a8464e2ad6fe9fa7141bcaebe3543fe18ce2a706
tree    029e0cbcfa2d68f659225b50fc83dd7a7d2e94e3
parent  c67fe547a70bb85e6b86e50337cc624e2dc42e97
...
1
2
3
 
4
5
6
...
17
18
19
20
 
21
22
23
...
36
37
38
39
 
40
41
42
...
49
50
51
52
53
 
 
54
55
56
...
112
113
114
115
 
116
117
118
...
129
130
131
132
 
133
134
135
...
147
148
149
150
 
151
152
153
154
 
155
156
157
...
1
2
 
3
4
5
6
...
17
18
19
 
20
21
22
23
...
36
37
38
 
39
40
41
42
...
49
50
51
 
 
52
53
54
55
56
...
112
113
114
 
115
116
117
118
...
129
130
131
 
132
133
134
135
...
147
148
149
 
150
151
152
153
 
154
155
156
157
0
@@ -1,6 +1,6 @@
0
 require File.dirname(__FILE__) + '/helpers'
0
 
0
-module Haml #:nodoc:
0
+module Haml
0
   class Engine
0
     include Haml::Helpers
0
 
0
@@ -17,7 +17,7 @@ module Haml #:nodoc:
0
       options.each { |k,v| eval("@#{k} = v") }
0
 
0
       @template = template #String
0
- @result, @precompiled, @to_close_queue = String.new, String.new, []
0
+ @result, @precompiled, @to_close_stack = String.new, String.new, []
0
       @scope_object = Object.new if @scope_object.nil?
0
     end
0
 
0
@@ -36,7 +36,7 @@ module Haml #:nodoc:
0
       handle_multiline(0, nil)
0
 
0
       # Close all the open tags
0
- @to_close_queue.length.times { close_tag }
0
+ @to_close_stack.length.times { close_tag }
0
 
0
       # Compile the @precompiled buffer
0
       compile
0
@@ -49,8 +49,8 @@ module Haml #:nodoc:
0
       if line.strip[0, 3] == '!!!'
0
         push_text %|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">|
0
       else
0
- if count <= @to_close_queue.size && @to_close_queue.size > 0
0
- (@to_close_queue.size - count).times { close_tag }
0
+ if count <= @to_close_stack.size && @to_close_stack.size > 0
0
+ (@to_close_stack.size - count).times { close_tag }
0
         end
0
         if line.length > 0
0
           case line[0].chr
0
@@ -112,7 +112,7 @@ module Haml #:nodoc:
0
     end
0
 
0
     def push_visible(text)
0
- @precompiled << "@haml_stack[-1] << #{tabs(@to_close_queue.size).dump} << #{text}\n"
0
+ @precompiled << "@haml_stack[-1] << #{tabs(@to_close_stack.size).dump} << #{text}\n"
0
     end
0
 
0
     def push_silent(text)
0
@@ -129,7 +129,7 @@ module Haml #:nodoc:
0
         if flattened
0
           push_silent("haml_temp = find_and_flatten(haml_temp)")
0
         end
0
- push_visible("#{wrap_script("haml_temp", @to_close_queue.size)} << \"\\n\"")
0
+ push_visible("#{wrap_script("haml_temp", @to_close_stack.size)} << \"\\n\"")
0
       end
0
     end
0
 
0
@@ -147,11 +147,11 @@ module Haml #:nodoc:
0
 
0
     def open_tag(name, attributes = {})
0
       push_text "<#{name.to_s}#{build_attributes(attributes)}>"
0
- @to_close_queue.push name
0
+ @to_close_stack.push name
0
     end
0
 
0
     def close_tag
0
- push_text "</#{@to_close_queue.pop}>"
0
+ push_text "</#{@to_close_stack.pop}>"
0
     end
0
 
0
     def one_line_tag(name, value, attributes = {})

Comments

    No one has commented yet.