mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Fixed a bug where ~ choked on non-string values.
git-svn-id: svn://hamptoncatlin.com/haml/branches/edge@155 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
155b74c71f
commit
2fb6003f7f
3 changed files with 3 additions and 1 deletions
|
@ -183,6 +183,7 @@ module Haml
|
|||
# Isolates the whitespace-sensitive tags in the string and uses Haml::Helpers#flatten
|
||||
# to convert any endlines inside them into html entities.
|
||||
def find_and_flatten(input)
|
||||
input = input.to_s
|
||||
input.scan(/<(textarea|code|pre)[^>]*>(.*?)<\/\1>/im) do |tag, contents|
|
||||
input = input.gsub(contents, Haml::Helpers.flatten(contents))
|
||||
end
|
||||
|
|
|
@ -40,4 +40,4 @@
|
|||
<strong>indeed!</strong>
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
13
|
||||
|
|
|
@ -56,3 +56,4 @@
|
|||
to
|
||||
http://www.network-science.de/ascii/
|
||||
%strong indeed!
|
||||
~ 13
|
||||
|
|
Loading…
Add table
Reference in a new issue