public
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/nex3/haml.git
Automatically #find_and_preserve filters that use #render.
nex3 (author)
Tue May 13 11:23:11 -0700 2008
commit  8c92d2cb9bb90f901e2593d2f6e48526e4d256a0
tree    2ca00e167d221ac7f755dfe9b44c5eed7960aa73
parent  535c40c47df7b8280c95349202f79883b9da5339
...
68
69
70
71
 
72
73
74
...
68
69
70
 
71
72
73
74
0
@@ -68,7 +68,7 @@ module Haml
0
             return
0
           end
0
 
0
- rendered = filter.render(text)
0
+ rendered = Haml::Helpers::find_and_preserve(filter.render(text), precompiler.options[:preserve])
0
 
0
           if !options[:ugly]
0
             push_text(rendered.rstrip.gsub("\n", "\n#{' ' * @output_tabs}"))
...
11
12
13
14
15
16
 
17
18
19
...
69
70
71
 
 
 
 
 
 
72
73
74
...
11
12
13
 
 
 
14
15
16
17
...
67
68
69
70
71
72
73
74
75
76
77
78
0
@@ -11,9 +11,7 @@ TESTING HAHAHAHA!
0
 <h1>Foo</h1>
0
 
0
 
0
- <pre><code>This is preformatted!
0
-Look at that!
0
-Wowie-zowie!</code></pre>
0
+ <pre><code>This is preformatted!&#x000A;Look at that!&#x000A;Wowie-zowie!</code></pre>
0
 
0
 
0
   <p><strong>boldilicious!</strong></p>
0
@@ -69,6 +67,12 @@ This
0
 
0
 </ul>
0
 <div class='res'>178</div>
0
+<p>
0
+ <p>I like preserved text:</p>
0
+
0
+
0
+ <pre><code>Foo&#x000A; Bar!&#x000A;Baz</code></pre>
0
+</p>
0
 <ul>
0
 <li>Foo</li>
0
 <li>Bar</li>
...
68
69
70
 
 
 
 
 
 
 
 
71
72
73
...
68
69
70
71
72
73
74
75
76
77
78
79
80
81
0
@@ -68,6 +68,14 @@
0
 
0
 .res= res
0
 
0
+%p
0
+ :textile
0
+ I like preserved text:
0
+
0
+ Foo
0
+ Bar!
0
+ Baz
0
+
0
 :markdown
0
   * Foo
0
   * Bar

Comments

  • kamal Tue May 13 16:21:46 -0700 2008

    Does this mean textareas now work out of the box?

  • nex3 Tue May 13 18:29:05 -0700 2008

    Well, they do, but not because of this commit in particular. This one just makes textareas in filters work.