mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Automatically #find_and_preserve filters that use #render.
This commit is contained in:
parent
535c40c47d
commit
8c92d2cb9b
3 changed files with 16 additions and 4 deletions
|
@ -68,7 +68,7 @@ module Haml
|
|||
return
|
||||
end
|
||||
|
||||
rendered = filter.render(text)
|
||||
rendered = Haml::Helpers::find_and_preserve(filter.render(text), precompiler.options[:preserve])
|
||||
|
||||
if !options[:ugly]
|
||||
push_text(rendered.rstrip.gsub("\n", "\n#{' ' * @output_tabs}"))
|
||||
|
|
|
@ -11,9 +11,7 @@ TESTING HAHAHAHA!
|
|||
<h1>Foo</h1>
|
||||
|
||||
|
||||
<pre><code>This is preformatted!
|
||||
Look at that!
|
||||
Wowie-zowie!</code></pre>
|
||||
<pre><code>This is preformatted!
Look at that!
Wowie-zowie!</code></pre>
|
||||
|
||||
|
||||
<p><strong>boldilicious!</strong></p>
|
||||
|
@ -69,6 +67,12 @@ This
|
|||
|
||||
</ul>
|
||||
<div class='res'>178</div>
|
||||
<p>
|
||||
<p>I like preserved text:</p>
|
||||
|
||||
|
||||
<pre><code>Foo
 Bar!
Baz</code></pre>
|
||||
</p>
|
||||
<ul>
|
||||
<li>Foo</li>
|
||||
<li>Bar</li>
|
||||
|
|
|
@ -68,6 +68,14 @@
|
|||
|
||||
.res= res
|
||||
|
||||
%p
|
||||
:textile
|
||||
I like preserved text:
|
||||
|
||||
Foo
|
||||
Bar!
|
||||
Baz
|
||||
|
||||
:markdown
|
||||
* Foo
|
||||
* Bar
|
||||
|
|
Loading…
Reference in a new issue